Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

String-Off Server Infomation in result data of POST

Posted on 2004-10-10
2
Medium Priority
?
207 Views
Last Modified: 2006-11-17
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
Comment
Question by:xuzhaogang
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 48

Accepted Solution

by:
hernst42 earned 800 total points
ID: 12272863
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
 

Author Comment

by:xuzhaogang
ID: 12430033
Thanks, man
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
Many old projects have bad code, but the budget doesn't exist to rewrite the codebase. You can update this code to be safer by introducing contemporary input validation, sanitation, and safer database queries.
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question