Hi,
I have used $_SERVER['HTTP_REFERER']; in my web page, to check the referrer site url.
It work for some websites, Not for many. Huh
Even i used $_SERVER to list all the server variables, but not getting HTTP_REFERER variable.
So, please kindly help me to resolve this issue.
Thanks In advance,
dselva
HTTP_REFERER Issue
Moderator: General Moderators
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
- The Phoenix
- Forum Contributor
- Posts: 294
- Joined: Fri Oct 06, 2006 8:12 pm
Re: HTTP_REFERER Issue
Its optional, so some browsers and users choose not to pass it along.dselva wrote:I have used $_SERVER['HTTP_REFERER']; in my web page, to check the referrer site url.
It can also be blocked by corporate filters. If someone browses from work, and they use a proxy, you won't get a referrer.
It can also be blocked by plug-ins, add-ons, and by user action on a one-off basis, so it could work for a user one day, and not another.
When typing an url into a new window, or loading your page as a homepage on startup, or clicking on a saved link to your site, the referrer will be blank.
Its completely unreliable. Its nice to have, but do not rely on it.
Some webservers do not provide the http_referer variable at all.dselva wrote:Even i used $_SERVER to list all the server variables, but not getting HTTP_REFERER variable.
If you are using this to track referrals to your web site, you would be better off having a database table with the names/ids of people who are referring traffic to you.
Then, when someone clicks their referral link to your site (that must contain their name/id), you can update the record in your referral table to increment the corresponding referral count for that name/id.
Then, when someone clicks their referral link to your site (that must contain their name/id), you can update the record in your referral table to increment the corresponding referral count for that name/id.
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.