Jump to content

Recommended Posts

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.