How can I find out where a site visitor comes from?
$_SERVER["HTTP_REFERER"]
So imagine there was a link on http://www.mysite.com to http://www.yoursite.com/index.php and on that page you had:
$detect = $_SERVER["HTTP_REFERER"];
echo "I know where you came from! You clicked on a link from $detect didn't you!";
... then you will be able to tell your user where they came from.
Comment on this Question and Answer >>>
ASK A QUESTION
More website PHP Questions
I have a main WEB page that will be sereved. This page has text data on it that will come from a file(iframe). The data in the file will be changed when other applications make requests to the apache server to server data from a database. When this hapHow to expire cookies when user pressed a button in webpage? I want have a link in my website then delete cookies.
What is a .htaccess file?
How do I find a visitors IP address?
How do I make sure an include file exists before loading the page?
