Created
January 10, 2014 17:21
-
-
Save technosailor/8358491 to your computer and use it in GitHub Desktop.
Nothing fancy. Just a way to get your external IP. Useful for dealing with services that you have to have a white listed IP and maybe you have a lot of servers in a cluster and need to know what the external service is seeing. It's like I'm describing my own personal hell right now...
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 | |
$json = file_get_contents( 'http://ifconfig.me/all.json' ); | |
$data = json_decode( $json ); | |
echo $data->ip_addr; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment