Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 212
  • Last Modified:

String-Off Server Infomation in result data of POST

Hi experts,
I am a newbie in PHP. Now I followed the example to 'emulate' a post to server by fsocketopen(...) and use fgets(...) to return the data returned from the server.
But I found I got server information before the actually data. ie. the page will return OK or DONE to indicate the posting action is successful, but I got data such like "HTTP/1.1 ..." before the actually result. Can anyone help to strip off those "HTTP/1.1..." ?

Thanks in advance.
Ray
0
xuzhaogang
Asked:
xuzhaogang
1 Solution
 
hernst42Commented:
have you looked at the HTTP_Request-package of PEAR which does those things for you? So you don't need to reivent the wheel ??

See http://pear.php.net/manual/en/package.http.http-request.intro.php for an example
0
 
xuzhaogangAuthor Commented:
Thanks, man
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now