Skip to content

Instantly share code, notes, and snippets.

@noam-sc
Created April 13, 2018 12:46
Show Gist options
  • Save noam-sc/4e678e375e528bbf537d237d1b912bc6 to your computer and use it in GitHub Desktop.
Save noam-sc/4e678e375e528bbf537d237d1b912bc6 to your computer and use it in GitHub Desktop.
Retrieve IP with CloudFlare
$user_ip = (isset($_SERVER["HTTP_CF_CONNECTING_IP"])?$_SERVER["HTTP_CF_CONNECTING_IP"]:$_SERVER['REMOTE_ADDR']);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment