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 John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I find Referer?

Status
Not open for further replies.

terryISO

Programmer
Sep 29, 2002
48
GB
Hi.

I know how to find the referrer identity of a web page which from which a Perl script is called on my server, using $ENV{'HTTP_REFERER'}.

But, some of my Clients run their calling pages as Internet pages, and others are running web pages as files, so that instead of the page location being (for example) " it would be something like "G:\html\page.html".

Now, $ENV{'HTTP_REFERER'} doesn't seem to provide referer information for these pages (it is empty).

Can anyone tell me how to find and capture the refering page's address (I need the filepath information - the "G:\html\" part)?

Many thanks!
 
HTTP_REFERER is canonically supposed to be a server -- so if the sending link was on a file on the filesystem, then a blank HTTP_REFERER is correct behavior.

Also, some browsers do not or may not report a referer at all. The Opera web browser, for example, can be easily configured to not report referers.

Unless the browser explicitly provides that data to your server, there is no way to get that data.



Want the best answers? Ask the best questions: TANSTAAFL!
 
Hi.

All of the people using the system will have IE 5.1 or higher, so I'm not worried about other Browsers. Also, none will be able to turn off the referer information.

I couldn't see any way to get the information, and just wondered if I was missing something. You seem to be confirming my understanding, though.

If I could have figured out the referer from a file system, then it would have made the project I am working on more neat. Oh well, I will have to resort to plan B for this system...

Thanks anyway.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top