I have an application when I am posting data on a fairly regular interval. I have one set of code which was developed for VB on the local side and classic ASP on server side, now I would like to change the servside to PHP.
The original code uses the xmlHTTP object to post xml data to an asp webpage, worked like a charm.
It turns out as I have learned more about what I am doing that the XML data I am posting as an XML ADO stream object.
ASP reads this fine.
I now wanted to redevlop the serverside code to use php. I have been trying the following code:
<?php
$arq = file_get_contents('php://input');
echo strlen($arq);
?>
This returns the correct string length, but If I echo the string or even search for things I know are in the string nothing comes back.
Im pretty sure the data is just not being converted in the right format, becuase this raw post data is in a binary format....or something else along these lines.
Again I've learned this is like becase I am posting the data using the ADO stream object. PHP reads the header and recognizes that it is has a certain length but then doesn't know how to handle the rest of the data.
I have tried a variety of commands like fread, fopen.....I know that the raw post data is turned on.
Further searches have revealed that the problem is in the format of the incoming post.
Does anyone have any suggestions of how to deal with the stream data?
Before you ask I have tried the get_stream_contents too. It comes back and says it can not get to any value in the stream.
Thanks