Page 1 of 1

Obscure web server question

PostPosted: Aug 2, 2005 @ 6:22pm
by David Horn
According to Peter Balogh of PDAmill, clicks going to www.pdamill.com tell the server where they come from, except for ones from PocketGamer.

This is a bit out of my league as I have no idea where the settings (if there are any) for something like this might be located.

Thanks!

PostPosted: Aug 2, 2005 @ 6:42pm
by refractor
The referrer details are passed on by the user agent (i.e. browser) in the HTTP header rather than by the server that hosted the URL (which doesn't communicate with the other server at all).

Addendum:

<a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.36">HTTP spec</a> ("referer" seems to be a spelling error that was there from the start and stayed).

Addendum addendum:

It's likely 'cos you're using _blank as a target for the links in your pages. As the links open in a new window there's no referrer to send to the linked site.

PostPosted: Aug 2, 2005 @ 11:58pm
by sponge
_blank does not pass on a referrer.

PostPosted: Aug 3, 2005 @ 12:08am
by Miracle

PostPosted: Aug 3, 2005 @ 8:19am
by sponge
_blank you Miracle.

PostPosted: Aug 3, 2005 @ 9:59am
by Miracle
:wink:

PostPosted: Aug 4, 2005 @ 7:45am
by ktemkin
You can just have the _blank link to another page on your webserver which uses META redirects, esentially just sticking in the referrer informaiton and then going right to their page; this is really easy with PHP.

Change the link <a href="http://www.website.com" target="_blank"> to <a href="http://www.pocketgamer.org/yourscript.php?q=http://www.website.com" target ="_blank">.

Then, write the following PHP script yourscript.php:

<?
echo "<<meta http-equiv=\"Refresh\" content=\"0;url=".$_GET['q']."\">";
?>

The script should inject the referrer information and then immediately forward to the next website.

PostPosted: Aug 4, 2005 @ 9:51am
by Miracle
Doesn't a header("redirect: {$url}"); send the referrer aswell? That would be a nicer way of doing this.

Also, I've seen this stuff before, only then they stored the url in a dbase and used id's to fetch them. Somewhat safer perhaps?

PostPosted: Aug 4, 2005 @ 10:38am
by David Horn
Well, I've been testing it, and on a test page with a bit of Javascript to spit out the headers, they're being passed whether the target is _blank or not.

So it's obviously something else that's not finding them.

PostPosted: Aug 4, 2005 @ 10:55am
by Miracle
There are several webbrowsers and applications that can be used on the client's PC that block sending referrers and the such. Now I don't think that everybody that goes there via pocketgamer uses that software, but it can be one of the reasons...

It's a bit weird though.

PostPosted: Aug 4, 2005 @ 4:47pm
by ktemkin