I want to limit which country can access my web page, but I cannot get it to work.
I tried to follow this guide .
This gives me a lot of errors when it is hosted on my localhost (XAMPP). Check the error in the screenshot:

And if it loads on some free hosting, it gives me an infinite "LOOP" when accessing domain.com/index.php or domain.com/redirect.php .
But on this web page it works and perfectly shows my data (country, country code, latitude, longitude, etc.)
I pasted these two files into the same folder and tried to access my computer, which:
http: //localhost/geoplugin.class/index.php
source share