Re: Show the entire browser request
| From: | Dotan Cohen | Date: | Tue, 09 Jun 2009 11:34:47 +0000 |
| Subject: | Re: Show the entire browser request | ||
| References: | 1 2 3 4 5 6 7 8 9 10 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-293798@lists.php.net to get a copy of this message | ||
> Run this on a command line and hit the IP on port 8000. All it does is
> read the request and send it back as the response. It ignores POST
> bodies but it would be pretty simple to modify it so it echo's those
> back too.
>
> http://dev.stut.net/php/httpsrv.phps
>
Stuart, that is quite a bit of work! Nice!
I also learned some really nice tips here, such as your usage of
define for the header and footer, and why that is the cleanest
solution when you need the content-length. The usage of sockets is new
to me too, but this was easy to follow.
Thanks!
--
Dotan Cohen
http://what-is-what.com
http://gibberish.co.il