Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
read IP not from headers...
Anything can be sent.
$_SERVER['REMOTE_ADDR'] is not taken from headers.
If you send any custom header to the server, it is prefixed with HTTP_
. For example, if you send a header REMOTE_ADDR
, then in all scripts on your site, this header will be available as$_SERVER['HTTP_REMOTE_ADDR']
Это вывод ключей и значений массива $_SERVER
. Как видно, переданный мной IP был записан в $_SERVER['HTTP_REMOTE_ADDR']
, а настоящий IP записан, как полагается, в $_SERVER['REMOTE_ADDR']
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question