...

View Full Version : Getting the referrer's URL without the need of clicking a link



Apothem
10-17-2009, 04:44 AM
I realized that the $_SERVER['HTTP_REFERER'] [or getenv('HTTP_REFERER')] would only return its referrer's URL only if I was directed to my site via a link (i.e. <a href="...">...</a>); it wouldn't return the referrer's URL if I typed in the link to my website OR if I clicked it through my Firefox's Bookmarks

How can I get the user's last URL even if they typed in the URL to my site or clicked it through something like My Bookmarks?

Fou-Lu
10-17-2009, 01:25 PM
You can't. HTTP_REFERER isn't reliable to begin with since its value is provided by the browser. If this data is not set, you cannot force it to set it.

barkermn01
10-17-2009, 11:24 PM
I realized that the $_SERVER['HTTP_REFERER'] [or getenv('HTTP_REFERER')] would only return its referrer's URL only if I was directed to my site via a link (i.e. <a href="...">...</a>); it wouldn't return the referrer's URL if I typed in the link to my website OR if I clicked it through my Firefox's Bookmarks

How can I get the user's last URL even if they typed in the URL to my site or clicked it through something like My Bookmarks?

The only way around this is to build you own browser that send the header even on click of button and good look there lol



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum