How to detect the site from which the user came before mine in PHP?

How can I find the site the user came from before accessing mine in PHP?

+4
source share
6 answers

Try the following:

$_SERVER['HTTP_REFERER']

For more information, see the HTTP referrer :

HTTP- - , HTTP- - , - , - ( URL, URI IRI i18n) , . , .

+9

HTTP-:

echo $_SERVER['HTTP_REFERER'];


, Referer , :

  • ( , )
  • ( - SQL- XSS, )


, -, , : , Referer .

+20
echo $_SERVER['HTTP_REFERER'];

, URL-, , script.

+2

HTTP-:

$_SERVER['HTTP_REFERER']

PHP HTTP

+1

@Andrew Hare , HTTP_REFERRER ( , HTTP-), , .

, , , header/server , :

  • URL-

, , , , , - , .

+1

, , , .

0

All Articles