$_SERVER['HTTP_REFERER']; PHP: Not all browsers will return this information to the server, but I think this is the function you are looking for.
$_SERVER['HTTP_REFERER'] echo $_SERVER['HTTP_REFERRER']; will give you the referring page if there is one..
hmmmm what about prxy sites? I mean if the users use proxy site? what will this command return? :s :s
The referrering page isn't where they are coming from it's where they have been, ( that made no sense when written down ) so if I click on a google link on these forums my referring url would be forums.digitalpoint.com Some proxy script block referring urls and useragents from being passed to the server. Wat are you trying to do exactly ?
yeah okay $_SERVER['HTTP_REFERRER'] would be right then for that, but it might not always be set for every visitor, so you should record those without referring urls aswell, for instance ppl with bookmarks or that use your site as a homepage, or that put the address directly into the addres bar......