First off i'd wonder why you'd want to do such a thing. Secondly, the header is set by the user agent (usually considered the browser). Which means that if you want to alter the referrer, you'll have to have your site acting as a proxy, as php would then be the user agent. However, that may or may not work with what you're trying to do.
Note: The referrer header can also be altered by something in the way of the network chain, like a firewall, however that isn't useful in this case but thought i'd mention it.
Note: If this is just for personal use you can simply look at some of the browser addons out there and do it on a browser by browser basis.
Last edited by Jarrod1937; 12-15-2010 at 01:33 PM.
First off i'd wonder why you'd want to do such a thing. Secondly, the header is set by the user agent (usually considered the browser). Which means that if you want to alter the referrer, you'll have to have your site acting as a proxy, as php would then be the user agent. However, that may or may not work with what you're trying to do.
Note: The referrer header can also be altered by something in the way of the network chain, like a firewall, however that isn't useful in this case but thought i'd mention it.
Note: If this is just for personal use you can simply look at some of the browser addons out there and do it on a browser by browser basis.
It's entirely up to the client what the referer will be. It's easily forged when scraping data or just browsing.
If the referring site was using SSL most (probably all A grade) browsers will scrub the referer.
There are ways with xss, or acting as a proxy and doing a simple mitm attack (not as simple if the site they land on is using SSL but still workable). But these methods may be illegal depending on where you live.
Sounds like you're trying to cheat SEO/google analytics or something.
hmm i want to fake referrer for cpa sites ,
i have source from which i get no referrer traffic , is there any way to make it custom [fake] referrer traffic ?
Originally Posted by eval(BadCode)
It's entirely up to the client what the referer will be. It's easily forged when scraping data or just browsing.
If the referring site was using SSL most (probably all A grade) browsers will scrub the referer.
There are ways with xss, or acting as a proxy and doing a simple mitm attack (not as simple if the site they land on is using SSL but still workable). But these methods may be illegal depending on where you live.
Sounds like you're trying to cheat SEO/google analytics or something.
Bookmarks