Forum Moderators: coopster
They have told me that they are posting the data using the following method:
<?php
$fp = fsockopen("www.example.com", 80, $errno, $errstr, 30);
if (!$fp)
{
echo 'Could not open connection.';
}
else
{
$xmlpacket ='<?xml version="1.0"?>
<Your_xml>
</Your_xml>';
$contentlength = strlen($xmlpacket);
$out = "post /script_name.php HTTP/1.0\r\n";
$out .= "Host: www.example.com\r\n";
$out .= "Connection: Keep-Alive\r\n";
$out .= "Content-type: application/x-www-form-urlencoded\r\n";
$out .= "Content-length: $contentlength\r\n\r\n";
$out .= "xml=$xmlpacket";
fwrite($fp, $out);
while (!feof($fp))
{
$theOutput .= fgets($fp, 128);
}
fclose($fp);
// $theOutput is the response returned from the remote script
}
?>
When they run tests, or when I run tests (both with valid XML, not just the empty XML in the example), I end up with nothing but an empty array when I echo $_POST.
Does anyone have any insight on what the problems might be here? Is there any other way that I could be receiving and access this information other than inside the $_POST variable?