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 would like to browse to a url eg http://mysite.com/index.html and dump the content of that site in a variable eg $htmlDump?What is this form of code for a website? http://www.virginamerica.com/va/home.do the drop down menu's. whats the name for that. im trying to incorporate it into my design, but dont no the name for it.
How do I perform a 301 redirect with PHP?
Hello - I am writing a PHP program to control an external camera connected to the USB port. For example I issue commands such as 'up', 'down', etc via an external program that I call using exec("cameracontrol.exe"). I would like to store
Can you write the PHP for my website for me?
