Last active
August 29, 2015 14:03
-
-
Save alexcreek/2956178a485e6b3fc723 to your computer and use it in GitHub Desktop.
Usage: curl [FILE] - returns WAN IP address
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 | |
$ua = getenv('HTTP_USER_AGENT'); | |
$ip = getenv('REMOTE_ADDR'); | |
if (strpos($ua,'curl') !== false) { | |
echo "$ip \n"; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment