Another use for it is in sessions.
I made a session class that passed the session ID (SID) from page to page without the need for cookies and without the need to append the SID to the end of every URL in the page.
How it works:
When a user logs in (or otherwise begins their session) they are redirected to a page with the SID amended to the end of the URL. When they click on a link, the requested page gets the SID from the HTTP_REFERER URL, and redirects the user to $_SERVER['PHP_SELF']."?SID=$sid".
In theory it allowed users with cookies disabled to be able to use sessions, even if the webmaster didn't manually add the SID to the end of each URL, but it would cause infinite loops if someone had both cookies AND HTTP_REFERERs turned off in their browser (it's possible to stop your browser from sending the HTTP_REFERER when it requests pages).
If you're interested to see just what your browser is sending to web pages, then you might consider running a packet sniffer (such as ethereal) while you request a page. You can also go to
http://www.colinhorne.co.uk/~colin/p...fined_vars.php (view the pages source), to see all the variables that are set when you view my webpage.
You'll probably be most interested in the $_SERVER array.
Cheers
--
Please contact me at:
Colin (dot) Horne (at) gmail (dot) com