hanwellchris Posted November 21, 2007 Share Posted November 21, 2007 I have an application which is using PHP to talk to a socket on a service implemented in Delphi. The PHP requests data from the delphi service which is monitoring some third party real time data. The command protocol is simple, a command string is passed by PHP to the service, and it returns an XML formatted set of data. I first implemented this a year ago, under PHP 5 and apache 2, and it worked fine, but I have recently setup a new system using exactly the same tools and versions and found that any XML fomatted data that I send across the socket is having its tags removed, resulting in just the data items all concatenated together. I have a service test harness also written in Delphi which is successfully retrieving the entire XML string, so I am confident that it is being sent to the socket OK. It seems that the PHP socket implementation is arbitrarily stripping out the tags. I can see the string as it is received by the PHP and it does not have any tags in it!!! I am using fsocketopen, and fgets (not fgetss) to read the data. I am pulling my hair out with this one, and I dont have much to spare! Does anyone have any ideas?? Thanks Chris Link to comment https://forums.phpfreaks.com/topic/78262-php-sockets-and-xml-problem/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.