Hide HTTP Referer Header Script
When an HTML link that references a website is clicked, the web browser will send a request to the server holding the destination webpage / website. Among the request sent by the browser to the server is the HTTP Referer which indicate the URL of the webpage that refered the user to the site.
For example, say http://tech4sky.com links to http://wapden.net, the HTTP referer will be Tech4sky.com because it referred the user who clicked it HTML link to the Wapden.net site.
Below is an image of a request header with the Referer field sent to the linked website server.
Using my PHP script to link to a website will remove the HTTP referer field.
For reason best known to you, you might want to block the referer field from being sent when an external link in your site is clicked.
This can be useful in a number of situations such as:
- Perhaps you think webmasters don’t have any business knowing where you found the link to their site.
- Some sites perform misguided referer checks in the name of “security”. These checks don’t add any real security since the referer is easily faked and can often cause problems when the browser’s behavior changes. You can these sites whatever they are expecting and work around this kind of problem.
- Send humorous things, secure in the knowledge that they are being written into the server’s log file for the amusement of anyone who might later discover them there. Ok, maybe that’s not much fun, but you can do it anyway.
This PHP script remove or blank out the HTTP referer when linking to a website.
With this script, you will be able to build your own
http://nullreferer.com http://anonym.to http://refhide.com alternative.
As a bonus when you buy this script, you will receive a
sitepoint's eBook of your choice for free.