Muffinman wrote:
I have a script using the $_SERVER['HTTP_REFERER'] var. I now
installed php 5 and this function does not work, 'undefined index' it
says. Can anyone tell me what could be wrong?
It won't be set if no referer information was passed by the browser.
There are three circumstances I can think of when the referer
information is not passed to the browser:
1) The user has typed the address into their browser, clicked a link in
an email client, used a bookmark etc. The referer info will not be set
as they have not been refered from another web page.
2) The user has a browser preference which prevents the referer
information from being passed or uses proxy type software which
prevents this from being passed. (Sometimes this software passes a
referer url but if it does it's usually either the same as the
requested page or the site's homepage and will be the same as they move
from page to page).
3) It's a robot/spider or some script created by the user. These
typically won't pass referer information as they move from page to
page. (Some exceptions are spammy type bots which post a referer url
back to their own site).
--
Chris Hope - The Electric Toolbox -
http://www.electrictoolbox.com/