PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

Obscure web server question

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!
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.
_blank does not pass on a referrer.
Damn you _blank, damn you :).
_blank you Miracle.
:wink:
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.
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?
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.
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.
Here, try linking here, it'll output whatever referer information your server gives out.

http://www.robotics810.info/scripts/output_referer.php