Page 1 of 1

read http requst

Posted: Mon Nov 22, 2010 5:27 am
by zzclare
Hi,

Which method can I use to read http request that sent by client. I have server(Apache) installed in my computer, and the client will send me a file by using http request POST. I want to write an php code which can listen the http request and read the file that client send me. I have been searching for the solution for a long time, but didn´t get exact answer.
So far I found the following method could be used:
HttpRequest::getPostFiles
HttpRequest::getRawPostData — Get raw post data
HttpMessage::getBody — Get message body
http://www.php.net/manual/en/features.f ... method.php
does anyone has experience with this kinds of problem. Can you provide me some examples or a documentation?

Thank you

Re: read http requst

Posted: Mon Nov 22, 2010 1:51 pm
by Christopher
The page in the PHP manual (about the $_POST and $_FILES arrays) has several examples of how to do this. Example #1 shows a form and Example #1 show receiving the uploaded file.