I've been trying to use this for some scripts recently and from what I understand, this does not work a lot of the time (mostly due to browsers and settings/etc). Also apparently if you are being sent to the webpage via a redirect it will not work. I was just wondering, is there anyway around getting this to work with redirects? Like maybe changing the redirect (perm/temp) numbers around? Also, if that is the case where HTTP_REFERER does not work most of the time, does that mean that if I pass people through a redirect to go through to another site, that the other site will have no idea where the traffic came from? (even after checking their stats)
You can not "force" people/browsers to have the Refferer passed on. If they hide it, then the information is by no means accesible. What you can do is to pass some variables in calls to your site that are unique to a specific refferer. For instance you can see if an user comes from site X if the link published on that site is http;//yoursite/index.php?ref=SITE_X By reading the "ref" variable you can know that it comes from site X or not. The same would be the case for the upstream site, redirect your users with a specific variable I am also not sure that most users would hide the refferer. Google masks the search keywords it in their search results for authenticated users, that is why most refferring pages come with "no keywords" lately, but i still think that most users have the refferer on.
What is your end-goal here? Perhaps we can suggest alternative means for you to get there... but you need to give more details to what you want the overall script to do.