Solved

String-Off Server Infomation in result data of POST

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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This article discusses how to create an extensible mechanism for linked drop downs.
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

756 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