I have read that if you are invoking a PHP script (PHP file) from javascript then you will not be able to get the environment variable, \"$HTTP_REFERER\" from the calling
page. \"$HTTP_REFERER\" will generally only work on links that the user actually, physically clicks on.
In most browsers, it won\'t even work if you manually type in the URL in the location bar of the browser window.
Again, the general rule of thumb is that \"$HTTP_REFERER\" will only get set accurately if the user actually clicked a link.
This is what I read in the PHP manual on php.net..specifically, on this page:
http://download.php.net/manual/en/language.variables.predefined.php
Apparently the \"$HTTP_REFERER\" environment variable is also totally unreliable in some versions of AOL\'s browser and in all versions of WebTV.
Basically, it looks like it\'s best not to rely on this variable for the functionality of your application.
Sory I can\'t be of any help as to an alternative solution, but at least you won\'t be \"beating a dead horse\" any more.
Good luck!
-THEO-
Anoop Sharda wrote:
HI
I have a exit code written in Javascript in one of my sites, which is calling a PHP script from another site on unload of that page. From that PHP script I want to access HTTP_REFERER variable to get an idea from where my PHP script was called. I get HTTP_REFERER from netscape but from IE I don\'t get this variable. How can I trace this HTTP_REFERER.
Anoop