Reply
$_SERVER['HTTP_REFERER'] fails under internet explorer (windowz)
Old 11-23-2004, 12:32 PM $_SERVER['HTTP_REFERER'] fails under internet explorer (windowz)
ibbo's Avatar
Super Spam Talker

Posts: 880
Location: Leeds UK
Trades: 0
What is the best server var to catch this under IE. Works a dream under firefox / mozilla but fails when IE attempts to get it.

ibbo
ibbo is offline
Reply With Quote
View Public Profile Visit ibbo's homepage!
 
 
When You Register, These Ads Go Away!
Old 11-23-2004, 02:12 PM
Kyrnt's Avatar
The Post-Mod Years

Posts: 2,535
Location: Western Maryland
Trades: 0
ibbo,

Remember that the $_SERVER super-global array is present only on the server and is not affected by the browser. The value of $_SERVER[HTTP_REFERER] is processed on the server by the PHP processing engine and cannot be affected by the browser client. Is there another problem this could be attributed to?

See http://us2.php.net/reserved.variables
__________________
—Kyrnt
Kyrnt is offline
Reply With Quote
View Public Profile Visit Kyrnt's homepage!
 
Old 11-23-2004, 09:32 PM
vivekar's Avatar
Webmaster Talker

Posts: 549
Trades: 0
I have heard that use of firewalls such as ZoneAlarm might be the problem. ZA can be configured to disable the referer value being passed from the client.

You say that only IE is affected. It is confusing to me also.
__________________
Note: Submit your website in Allthewebsites Directory and find Google PageRank of any URL.
vivekar is offline
Reply With Quote
View Public Profile Visit vivekar's homepage!
 
Old 11-24-2004, 05:05 AM
ibbo's Avatar
Super Spam Talker

Posts: 880
Location: Leeds UK
Trades: 0
Quite simply the HTTP_REFER is empty when i browse to the site from IE. Mozilla and Firefox have it set but not IE.

I am doing a mail a friend section and require HTTP_REFER as the reference to the page that they wish their mate to see.

STRANGE

Ibbo
ibbo is offline
Reply With Quote
View Public Profile Visit ibbo's homepage!
 
Old 11-24-2004, 05:25 AM
ibbo's Avatar
Super Spam Talker

Posts: 880
Location: Leeds UK
Trades: 0
So

Mozilla/ Firewfox listing for print_r($_SERVER) lists [HTTP_KEEP_ALIVE] => 300 [HTTP_REFERER] => www.myhost.com

These are missing when run from IE. Thats just not funny.

Thankfully i can build the link from HTTP_HOST, PHP_SELF and QUERY_STRING though i am far from impressed with IE over this (makes my work so much harder).

The only shame is its the target browser so no matter how bloody good firefox etc are they will never be used as much as IE (not yet anyway).

Ibbo
ibbo is offline
Reply With Quote
View Public Profile Visit ibbo's homepage!
 
Old 08-28-2008, 10:01 AM Re: $_SERVER['HTTP_REFERER'] fails under internet explorer (windowz)
Experienced Talker

Posts: 33
Name: Toby Osbourn
Trades: 0
Sorry to bump up and old topic, but I found this on a google search and it is exactly the problem I am having!

Does anyone know a good workaround to get the value that appears when you run with with Firefox in Internet Explorer?

Basically, I just want to know what page sent me to the page the code will sit on.

For example HTTP_REFERER was giving me the full URL and I need to compare this page to something, even just page1.php or something would do.
tosbourn is offline
Reply With Quote
View Public Profile
 
Old 08-28-2008, 10:47 AM Re: $_SERVER['HTTP_REFERER'] fails under internet explorer (windowz)
chrishirst's Avatar
Super Moderator

Posts: 21,651
Location: Blackpool. UK
Trades: 0
Turn off whatever is blocking the referrer field in IE.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
Growing old is mandatory - Growing up is optional
Code Samples | People Counting System | Bits & Bobs
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 08-28-2008, 10:56 AM Re: $_SERVER['HTTP_REFERER'] fails under internet explorer (windowz)
Experienced Talker

Posts: 33
Name: Toby Osbourn
Trades: 0
Do you have any guesses where I would turn this off? I can't see anything in internet options.
tosbourn is offline
Reply With Quote
View Public Profile
 
Old 08-28-2008, 05:57 PM Re: $_SERVER['HTTP_REFERER'] fails under internet explorer (windowz)
chrishirst's Avatar
Super Moderator

Posts: 21,651
Location: Blackpool. UK
Trades: 0
It won't be in IE, it will be some third party "Internet Security" tool Nortons or AVG Advanced or something similar that is set "hide your tracks" while browsing.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
Growing old is mandatory - Growing up is optional
Code Samples | People Counting System | Bits & Bobs
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 08-28-2008, 06:46 PM Re: $_SERVER['HTTP_REFERER'] fails under internet explorer (windowz)
Experienced Talker

Posts: 33
Name: Toby Osbourn
Trades: 0
Hmm, interesting, I will look into this tomorrow and see if it makes any odds. Cheers for the advice.
tosbourn is offline
Reply With Quote
View Public Profile
 
Old 08-29-2008, 06:53 AM Re: $_SERVER['HTTP_REFERER'] fails under internet explorer (windowz)
Experienced Talker

Posts: 33
Name: Toby Osbourn
Trades: 0
I have turned off and tested pretty much everything I can think of, still no joy.

Thanks anyway!
tosbourn is offline
Reply With Quote
View Public Profile
 
Old 01-06-2009, 03:02 PM Re: $_SERVER['HTTP_REFERER'] fails under internet explorer (windowz)
Junior Talker

Posts: 1
Name: Richard
Trades: 0
::bump::
If IE (6, at least) will not carry HTTP_REFERER( or without clever user modifications) then I can't design a PHP process with it that will be accessible to all viewers.

I can't believe this is not mentioned in the most basic of PHP books.

Any further help?
CalmQuiet is offline
Reply With Quote
View Public Profile
 
Old 01-06-2009, 03:08 PM Re: $_SERVER['HTTP_REFERER'] fails under internet explorer (windowz)
tripy's Avatar
Do not try this at home!

Posts: 3,141
Name: Thierry
Location: I'm the uber Spaminator !
Trades: 0
Yep, don't consider ever that you have the referrer.
You could emulate it easily, with something like
PHP Code:
$_SESSION['lastPage']=$_SERVER['PHP_SELF']; 
at the end of each page, or in an appended file.
That way, you can track which page the user watched on the last access, and you update it at the end of the running script.

The referrer is totally inaccurate and can be modified client side, do not ever trust it.
__________________
Only a biker knows why a dog sticks his head out the window.
tripy is online now
Reply With Quote
View Public Profile Visit tripy's homepage!
 
Old 01-10-2009, 10:44 PM Re: $_SERVER['HTTP_REFERER'] fails under internet explorer (windowz)
anderswc's Avatar
Super Talker

Posts: 132
Name: Will Anderson
Location: Terre Haute, IN
Trades: 0
Yeah, actually was working with a friend on this a couple weeks ago because he was trying to use HTTP_REFERRER to to make sure users were valid. DON'T DO THIS! This value IS set by the browser, and you can actually change it. Only use it as a convenience (for example, you might find sites using Google and find that they highlight your keywords. This is done with HTTP_RERERRER). Never use it if it MUST work.
__________________
Will Anderson
It's An Anderson | Twitter | Anderson Web Solutions
anderswc is offline
Reply With Quote
View Public Profile Visit anderswc's homepage!
 
Old 03-26-2009, 08:26 PM Re: $_SERVER['HTTP_REFERER'] fails under internet explorer (windowz)
valenea's Avatar
Super Talker

Posts: 112
Trades: 0
I wonder if this will pose problems with the IE8 or whatever number their up to now. Seems as if the minute you get your hands around a problem, Microsoft decides to confuse everyone once again by throwing out a new version.
valenea is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to $_SERVER['HTTP_REFERER'] fails under internet explorer (windowz)
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 



Page generated in 0.16741 seconds with 13 queries