FORUMS


The Form Tools forums are no longer active, but the old posts have been archived here. Please see the Help page on how to get help / report issues.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
CloudFlare: Getting original IP address of the visitor
#4
Hey guys,

Mind trying a quick thing?

Add this line to your config.php file:

PHP Code:
$_SERVER['REMOTE_ADDR'] = $_SERVER["HTTP_CF_CONNECTING_IP"] ? $_SERVER["HTTP_CF_CONNECTING_IP"] : $_SERVER["REMOTE_ADDR"]; 

From what I've *read*, Cloudflare passes the original users' IP address via the HTTP_CF_CONNECTING_IP header, so that should fix it for Form Tools.

That said, I quickly tried setting it up on one of my own domains and didn't see the header that I expected.

Still, give it a go and let me know. It won't cause any problems if it doesn't work.

- Ben

Reply


Messages In This Thread
RE: CloudFlare: Getting original IP address of the visitor - by Ben - Aug 31st, 2011, 9:16 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)