Created
January 6, 2016 02:36
-
-
Save seanslater/c045e26e9e0d60886261 to your computer and use it in GitHub Desktop.
Cloudflare DNS: Get users actual IP address (otherwise $_SERVER['REMOTE_ADDR'] will show a range of Cloudflare IPs for all users)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if (isset($_SERVER['HTTP_CF_CONNECTING_IP'])) $_SERVER['REMOTE_ADDR'] = $_SERVER['HTTP_CF_CONNECTING_IP']; | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment