FireFox! The PHP Forum Loans and Credit
Panama Web Design for Hire Free Insurance Quotes!
Web Hosting Advertise Here $10 a Month Designer Children
Never Pay Taxes Again HGH Domain name registration
Web Hosting and Dedicated Servers Insurance Affordable web-hosting


HomeWatched TopicsRegisterSearchDirectory
FAQMemberlistUsergroupsLog inStoresItemsBank
Google

Reply to topic Page 1 of 1
Refering to other site
Message  

Reply with quote
Post Refering to other site 
Hi all,
On http://lyricslist.com I link to another site with a simple <a href=''> link. The other site reads the $HTTP_REFERER variable and gives me one point for each click. I want to know how many people are clicking that link. So I created a goto.php file, that records the click to a database and send the visitor on her way with a redirect:
Code:

$url=" http://song-lirics.com ";  // $url is set before header()
header("Location: $url");

The redirect works, but the variable $HTTP_REFERER is not set at the other site! So they don't know where the hit came from! I also tried using a meta tag redirect, but that doesn't work either. I tried this in FireFox and Opera. Please, if anyone could shed any light on the subject, I would appreciate it. Thanks!

Dotan Cohen
http://IE-only.com

View user's profile Send private message Visit poster's website Yahoo Messenger ICQ Number

Reply with quote
Post  
Using just $HTTP_REFERRER requires register_globals to be turned on.  This method has been depreciated by the PHP group.  You need to use $_SERVER['HTTP_REFERRER'] to get the refferrer now.

View user's profile Send private message Visit poster's website

Reply with quote
Post  
This is normal behavior.  You need to set the php referer manually using another header:

Code:

$url=" http://song-lirics.com ";  // $url is set before header()
header("Referer: $url");
header("Location: $url");


That should work for you.  If not, try placing the Referer line below the location line and see what happens.


_________________
www.ChooseAGoodHost.com Reliable, quality hosts
Freelance Scripting - Freelance and IT Outsourcing Marketplace
CzarWeb Solutions - Custom Design, Programming, and Web Hosting
View user's profile Send private message Visit poster's website
Display posts from previous:
Reply to topic Page 1 of 1
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 vote in polls in this forum
  



Google

FireFox! The PHP Forum Loans and Credit
Panama Web Design for Hire Free Insurance Quotes!
Web Hosting Advertise Here $10 a Month Designer Children
Never Pay Taxes Again HGH Domain name registration
Web Hosting and Dedicated Servers Insurance Affordable web-hosting


Web Design by PlatinumShore.com & Web Hosting by TradeWebHosting.com