This site is no longer active and is available for archival purposes only. Registration and login is disabled.

Obscure web server question


Obscure web server question

Postby David Horn » Aug 2, 2005 @ 6:22pm

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!
Crosswind technique: "Using your peripheral vision, react to body movements, gasps, groans, and shouts from the other side of the cockpit, and always remember that it's better to be lucky than good."
User avatar
David Horn
<b>The Boss</b>
 
Posts: 1867
Joined: Feb 17, 2002 @ 2:10pm
Location: PocketGamer Towers (New York, Paris, Leeds)


Postby refractor » Aug 2, 2005 @ 6:42pm

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.
User avatar
refractor
pm Insider
 
Posts: 2304
Joined: Feb 5, 2002 @ 1:12pm
Location: Luxembourg


Postby sponge » Aug 2, 2005 @ 11:58pm

_blank does not pass on a referrer.
holy internets batman.
User avatar
sponge
Not sponge
 
Posts: 12779
Joined: Jan 13, 2002 @ 8:04am
Location: New Hampshire


Postby Miracle » Aug 3, 2005 @ 12:08am

Miracle
pm Insider
 
Posts: 1879
Joined: Aug 8, 2003 @ 1:41pm


Postby sponge » Aug 3, 2005 @ 8:19am

_blank you Miracle.
holy internets batman.
User avatar
sponge
Not sponge
 
Posts: 12779
Joined: Jan 13, 2002 @ 8:04am
Location: New Hampshire


Postby Miracle » Aug 3, 2005 @ 9:59am

:wink:
Miracle
pm Insider
 
Posts: 1879
Joined: Aug 8, 2003 @ 1:41pm


Postby ktemkin » Aug 4, 2005 @ 7:45am

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.
User avatar
ktemkin
pm Member
 
Posts: 1209
Joined: May 21, 2002 @ 9:51pm
Location: Smithtown, NY


Postby Miracle » Aug 4, 2005 @ 9:51am

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?
Miracle
pm Insider
 
Posts: 1879
Joined: Aug 8, 2003 @ 1:41pm


Postby David Horn » Aug 4, 2005 @ 10:38am

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.
Crosswind technique: "Using your peripheral vision, react to body movements, gasps, groans, and shouts from the other side of the cockpit, and always remember that it's better to be lucky than good."
User avatar
David Horn
<b>The Boss</b>
 
Posts: 1867
Joined: Feb 17, 2002 @ 2:10pm
Location: PocketGamer Towers (New York, Paris, Leeds)


Postby Miracle » Aug 4, 2005 @ 10:55am

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.
Miracle
pm Insider
 
Posts: 1879
Joined: Aug 8, 2003 @ 1:41pm


Postby ktemkin » Aug 4, 2005 @ 4:47pm

User avatar
ktemkin
pm Member
 
Posts: 1209
Joined: May 21, 2002 @ 9:51pm
Location: Smithtown, NY


Return to Anything Discussion


Sort


Forum Description

Post all off-topic messages here, almost anything goes.

Moderators:

Dan East, sponge, David Horn, Kevin Gelso, RICoder

Forum permissions

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

cron