|
-
January 17th, 2005, 09:10 AM
#1
Browser Referer Header
Heres the situation:
I'm writing a script in PHP that pulls the referer from the browsers request and compares it with other data. However, FF is doing something unexpected and I was hoping someone else can confirm something for me...
http://www.google.com/url?sa=U&start...ers.php&e=7629
This link goes to google, then immediately jumps to a site that views headers (this way the referer should be set)
Do this in IE and FF, and FF won't send the referer header. I've been all over google trying to find some reason for this to no avail.
So basically what I need is someone to tell me I'm not crazy and FF doesn't send referer headers, or any workarounds to get to that referer.
Here's the way I'm getting the header in PHP:
PHP Code:
<?php
echo $_SERVER['HTTP_REFERER'];
?>
Thanks!
-
January 17th, 2005, 11:16 AM
#2
Hi Soda
I suggest you to take a look at burpproxy[1], which is an interactive HTTP[S] proxy.
By capturing all incoming/outgoing 80/443 packets, you can check which header
information is sent by your test browser[s].
This gives you a first layer for debugging.
Cheers
P.s. the link you provided tells me antionline.com/... as referer, using FF 1.0.
[1] http://osx.freshmeat.net/projects/burpproxy/
/edit: to be consistent with moxnix (which is quite interesting: look at the
version of FF by moxnix and mine).
FF 1.0
and
using some version of IE6 ...
If the only tool you have is a hammer, you tend to see every problem as a nail.
(Abraham Maslow, Psychologist, 1908-70)
-
January 17th, 2005, 11:48 AM
#3
Soda,
This is what I am getting using Firefox ver 1.0
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Accept-Encoding: gzip, deflate
Accept-Language: en-us,en;q=0.5
Host: pgl.yoyo.org
Referer: http://pgl.yoyo.org/http/browser-headers.php
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0
Now let me jump over to IE6:Hope that helps you.
\"Life should NOT be a journey to the grave with the intention of arriving safely in an attractive and well preserved body, but rather to skid in sideways, Champagne in one hand - strawberries in the other, body thoroughly used up, totally worn out and screaming WOO HOO - What a Ride!\"
Author Unknown
-
January 17th, 2005, 04:50 PM
#4
Just so you know, automatic forwards will not set a referrer, you MUST click a link off a site in order for the referrer to be set. This is why FF wouldn't do it for you when you went manually, but works fine when you click the link. Try it yourselves:
Clicked on link:
Code:
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Accept-Encoding: gzip,deflate
Accept-Language: en-us,en;q=0.5
Connection: keep-alive
Host: pgl.yoyo.org
Keep-Alive: 300
Referer: http://www.antionline.com/showthread...hreadid=265350
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0
Copy and pasted link:
Code:
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Accept-Encoding: gzip,deflate
Accept-Language: en-us,en;q=0.5
Connection: keep-alive
Host: pgl.yoyo.org
Keep-Alive: 300
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0
Chris Shepherd
The Nelson-Shepherd cutoff: The point at which you realise someone is an idiot while trying to help them.
\"Well as far as the spelling, I speak fluently both your native languages. Do you even can try spell mine ?\" -- Failed Insult
Is your whole family retarded, or did they just catch it from you?
-
January 17th, 2005, 05:13 PM
#5
Right, when I click the link in my first post while in Firefox, I get this:
HTTP headers supplied by your browser ():
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Accept-Encoding: gzip,deflate
Accept-Language: en-us,en;q=0.5
Connection: keep-alive
Host: pgl.yoyo.org
Keep-Alive: 300
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0
So it looks like I'm crazy. Or I have some obscure setting enabled which I can't seem to find. I didn't use a proxy, but I did sniff the traffic when I made the request, no referer there either.
-
January 17th, 2005, 05:18 PM
#6
Hmm, clicking the link:
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Accept-Encoding: gzip,deflate
Accept-Language: en-us,en;q=0.5
Connection: keep-alive
Host: pgl.yoyo.org
Keep-Alive: 300
Referer: http://www.antionline.com/showthread...&postid=817700
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0
'
Copy/Paste the link:
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Accept-Encoding: gzip,deflate
Accept-Language: en-us,en;q=0.5
Connection: keep-alive
Host: pgl.yoyo.org
Keep-Alive: 300
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|