I am creating a PHP script that redirects users to a specific link, however, before redirecting the user I use the geoplugin.net API to obtain some specific information, such as country and state to generate reports of access to the links.
The problem is that the infinityfree proxy is getting in the way and returning me a False IP! Follow images.
Well you have some weird spaces and missing brackets, so maybe that may cause an issue? And I would not go changing a $_SERVER variable, especially since you are already using $ip.
You need to decide on one variable to use, and use one statement, not multiple, to obtain the IP. The only thing you need to test for is âCF-Connecting-IPâ. See the docs
@Greenreader9 this function is just to check which of the indexers is set with the userâs IP and return the existing value inside the index in the variable $ip, nothing more.
@Oxy I have already used this code and a False IP is returned in the same way.
Thatâs why I opened this topic on the forum, to ask for support, because Iâve already tested several ways to obtain IP with PHP and they all returned False IP.