Re: Tricky question - referrer from ousite, or from intern?
| From: | Bogdan Stancescu | Date: | Tue, 27 Aug 2002 09:19:25 +0000 |
| Subject: | Re: Tricky question - referrer from ousite, or from intern? | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-114235@lists.php.net to get a copy of this message | ||
Justin is right, there's no guarantee the referrer will be set. What you can do however is have a common pre-registration page you link to from everywhere on the site - and set some variable there to acknowledge they came from the site - and give "members" the direct address to the registration page.
What I wonder is how could a non-referred user be confused with a referred one - doesn't the referred one have some kind of variable in the URL which identifies the referer (i.e. isn't each referer being given a customized URL to pass to his/her referees?!).
Bogdan
Andy wrote:
Hello Justin, I just saw that you have been faster than me :-) However.. you think it might be not sure that this workes for every browser? PUh... thats bad. Do u have examples for that? It workes with IE on PC. Cheers Andy "Andy" <news.letters@gmx.de> schrieb im Newsbeitrag news:20020827085500.37913.qmail@pb1.pair.com...All righty! I found the solution: It might be for help to some other folkes. Here is the code which solvestheproblem:are#make sure he is not referred by our one website if (!ereg($HTTP_HOST, $_SERVER[HTTP_REFERER])){ #set referer cookie setcookie('referrer', $user_id, 0); } #redirectCheers, Andy "Andy" <news.letters@gmx.de> schrieb im Newsbeitrag news:20020827055649.25987.qmail@pb1.pair.com...Hi there, I have a tricky problem which I honestly think is not possible to solve. However maybe I am wrong. As you all know it is possible on php.net to pass a function name just behind the adress (e.G. php.net/function-name) this will redirct to the propper page. I did the same thing with member sites (e.G server.com/member-name) Now I am starting a referrer programm. Everymemberwho follows a link like from anywhere on the net and registeres will be tracked and the referrer gets a point. Now I did forget that I do have several of this links on my site itself :-) Which means that they havebeenaquired on my site by accident :-) My question is how can I make sure that they do come from outside andenteresnot surfing my site already. I do set a coockie as soon as someonetothis adress, but it would be fantastic if I could do a if statement on something to make sure he does not come from my own site. I would likekeep all the links like that, just to find a way to track the origin oftheuser. Thank you so much for any idea on this tricky task, Andy