Jump to content

record a browser referral?


Hooch
 Share

Recommended Posts

Hello, I have yet another question. I am making a referrals page. It works almost to a tee. But whenI link to my page fom my browser it recordsnothing. The command for recording a referral from anactual web page is

$url = $_SERVER['HTTP_REFERER'];

Is there a similar "Predefined Variable" for a referralwhen one comes from the address bar? Right now I have a temporary fix that does nothingif $url = NULL. I was wondering if it's possible to record the userscomputer name?Thanks..Hooch

Link to comment
Share on other sites

No, it is not possible to record the computer name. The browser optionally sets the referrer when the user clicks on a link, but the browser is not required to do this, and sometimes it is forbidden to. If a user is viewing a page over SSL and clicks on a non-SSL link, the browser should not send a referrer. If a user types the URL into the address bar themselves, then the referrer doesn't mean anything and is not sent by the browser. People can also choose to disable the referrer (at least in Opera), and you can also have the browser send anything you want for the referrer. It is useful for statistics, but you can't guarantee that it is accurate.

Link to comment
Share on other sites

ok great thanks man. Maybe I will add some text to the DB wheneverthis happens. It would be nice to know how many direct linksfrom the address bar are happening. More infois better. Well explained as usual, thank you Guy.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...