Re: [PHP3] Browsers problem !
| From: | Matthew Kendall | Date: | Fri, 02 Jun 2000 08:30:47 +0000 |
| Subject: | Re: [PHP3] Browsers problem ! | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-894@lists.php.net to get a copy of this message | ||
"Marian Vasile" <marianos@gmx.net> wrote...
> The server is detecting somehow an error into my bnrowser
> GET request... That's why I need to know what EXACTLY my
> browser is sending to that server to be able to crect it...
> I'm in Windows and that's why I need to create a php code on another
server,
> which it will print everything he (php script) will receive from browser.
The PHP script does not receive anything directly from the browser. The
browser talks to the web server, and then the web server invokes the PHP
script and passes it certain information in various environment variables.
You can see these with php_info() as others have suggested. PHP also makes
certain things available in PHP variables. You can see them using echo.
However, you cannot see what you seem to want to see, which is the actual
set of HTTP commands that the browser sends to the server.
> But I don't know what a browser is sending to the web page normally...
what
> Itnernet explorer is sending to servers for visits ?
See the HTTP spec in RFC 2616 or at http://www.w3.org/Protocols/
The simplest set of commands you can usefully send to a web server is:
GET /index.html HTTP/1.1
Host: www.yourhost.com
Replace /index.html and www.yourhost.com with the page and host of interest,
and note one blank line is needed to end the request. You can try this if
you Telnet to port 80 of the host and type the commands in by hand.