Solved

String-Off Server Infomation in result data of POST

Posted on 2004-10-10
2
163 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
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 Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
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 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 …

762 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now