Hi,
I've a basic php script set up on a web server to accept xml files received sent via Http post. So far so good. But I'm wondering about security issues and what other things I would need to be aware of before I could put this live. Has anyone done this beofre and what things I should be aware of?
Basically all I have so far is:
<?php
header('Content-type: text/xml');
if ( $_SERVER['REQUEST_METHOD'] == 'POST' )
{
$postText=file_get_contents('php://input');
$datetime=date('ymdHis');
$xmlfile="myfile" . $datetime . ".xml";
$FileHandle=fopen($xmlfile, 'w') or die("can't open file");
fwrite($FileHandle, $postText);
fclose($FileHandle);
echo
'<?xml version="1.0" encoding="UTF-8"?>
<cXML>
<Response>
<Status code="200" text="OK">OK</Status>
</Response>
</cXML>';
}
?>
which just writes the xml files onto the webserver. What checks would I need to be doing etc?
Thanks,