-
Find out what site a visitor cam from
Hello,
I have seen a script somewhere that enables you to see from which site a visitor came from before he went to yours.
For instance, if user X came from www.google.com to www.<mysitehere>.com and I had the script implemented, I could see that user X came from google.com.
I'm very badly trying to find this script and am unsuccesful so far, so any tips or links would be wonderful!
Thanks,
Qopzeep
-
-
Using a server side script the referrer can be displayed or recorded to a database, etc, but it isn't necessarily accurate-- since this is up to the browser/user, it can be faked or not sent at all. It is generally accurate, though, on average, for statistics, etc.
In PHP, you can find this value as part of the $_SERVER global array:
echo $_SERVER['HTTP_REFERER'];
Daniel -
Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum
-
-
The document has a property document.referrer that is "the url of the link that brought the browser to the current document, if any" (David Flanagan, Javascript: the definitive guide).
This works with the caveats mentioned by dir33 above.
John Rostron
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks