Solved

String-Off Server Infomation in result data of POST

Posted on 2004-10-10
2
199 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 200 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

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

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

Suggested Solutions

Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
This article discusses how to implement server side field validation and display customized error messages to the client.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
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…

752 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