Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HTTP_REFERER problem

Status
Not open for further replies.

PhillC

Technical User
Jul 11, 2002
4
GB
Hi,

I'm trying to access the HTTP_REFERER environmental variable. I've tried with Perl and with PHP3. With both languages I ran scripts to list all the environmental variables and in both cases, the HTTP_REFERER was not listed. Other variables such as HTTP_USER_AGENT were there but not the referer.

I've also been testing by storing visitor user-agents and referers in a file. The visitors, including me, arrive by clicking on search engine listings and the referers are passed on because they appear in the log file. I just can't access them by using Perls $ENV array or PHP's equivalent.

I think there must be a problem somewhere in the Apache configuration. I've looked through the httpd.conf file for any 'likely' lines but didn't find any.

If anyone has any ideas, or can point me in the right direction, I'd very much appreciate it.

Phil.
 
>> I ran scripts to list all the environmental variables and in both cases, the HTTP_REFERER was not listed.<<

HTTP_REFERER will only exist when there IS an HTTP_REFERER.

If you call your listing script from another page, HTTP_REFERER should be there, but if you just type in the script address from the browser address bar there will be no HTTP_REFERER
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top