$_SERVER['REMOTE_ADDR'] Displays server IP. How to see client IP?
PS hosting was just)
You probably installed NGINX. Read the article will help set up the server correctly.
The point is in the headers transmitted when nginx works as reverse proxy. For an application running as nginx, any client is local (with the IP address of the server). To avoid this, you need to correct the headers, as indicated in the article.
Source: https://ru.stackoverflow.com/questions/446730/
All Articles
var_dump($_SERVER);and look at what element you have transmitted real ip. - Visman