How can I know from wich address the visitator came to my website, like:
You came from www.somewhere.com?
thanks
echo "You came from " . $_SERVER['HTTP_REFERER'];
careful with that though, some browsers or proxy servers wont send it or will change it, so you should check if its set first, and then see if it is a valid url.
And if you want to doublecheck the url or get an IP address from where it came from, you can use this function:
http://us2.php.net/manual/en/function.gethostbyname.php