Webmasters Stack Exchange is a question and answer site for pro webmasters. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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: http://nix-pix.co.uk/ip

Note: I'm on a shared server, so I cannot do any server-side modifications

share|improve this question
up vote 2 down vote accepted

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.

share|improve this answer
    
Thanks, I'll give it a try! – Nick Jun 26 '12 at 18:25

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.