Mobile app version of vmapp.org
Login or Join
Si4351233

: IP Locator not working with Cloudflare I have set up an IP Locator service. Worked fine, until I started using Cloudflare: Instead of showing the user's IP address, Cloudflare shows its server's

@Si4351233

Posted in: #Geolocation #IpAddress

I have set up an IP Locator service. Worked fine, until I started using Cloudflare:

Instead of showing the user's IP address, Cloudflare shows its server's IP! What can I do?

My Site: nix-pix.co.uk/ip
Note: I'm on a shared server, so I cannot do any server-side modifications

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Si4351233

1 Comments

Sorted by latest first Latest Oldest Best

 

@Ravi8258870

This can be fixed in one of several ways:

In PHP, Cloudflare reports the real IP addresses like this: $_SERVER["HTTP_CF_CONNECTING_IP"];

For a server-side solution, you can install a module which will automatically resolve the correct IP. Information about restoring original visitor IP with CloudFlare.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme