Page 1 of 1

Setting a redirect referer

Posted: Thu Aug 04, 2005 5:40 am
by dotancohen
Hi all,
On http://lyricslist.com I link to another website with <a href=''>. They read $HTTP_REFERER and give me one point for each click. So far so good.

I want to know how many people are clicking on the link. So I created a goto.php file, that records the click and send the visitor on her way with a redirect:

Code: Select all

$url=" http://song-lirics.com ";  // $url is set before header()
header("Location: $url");
This works great, but the variable $HTTP_REFERER is not set at the other site! So they don't know that the hit came from me! I also tried using the meta tag redirect, but that didn't work either.

I tried this in FireFox 1.0.6 and in Opera 8. Please, if anyone could shed any light on the subject, I would appreciate it. Thanks!

Dotan Cohen
http://IE-only.com

Posted: Thu Aug 04, 2005 6:28 am
by Revan
header('Referer: http://www.yoursite.com');

Posted: Thu Aug 04, 2005 7:13 am
by feyd
the referer information is sent by choice of the browser. You don't have control over it.

If you returned a meta tag redirection page it may help solve it though.

Posted: Thu Aug 04, 2005 9:07 am
by dotancohen
I see that I don't have control over it. I do have a site that links to me, via a out.php page on their site. And the $HTTP_REFERER variable is certainly set when the user gets to my page. I can post a link if anybody wants to try it for themselves. How on earth are they doing that?