Created
January 8, 2011 02:30
-
-
Save Hunter-Dolan/770469 to your computer and use it in GitHub Desktop.
Json IP jQuery Script
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
<!--Include jQuery--> | |
<script src="http://code.jquery.com/jquery-1.4.4.js"></script> | |
<script> | |
//Get the JSON Code | |
$.getJSON("http://jsonip.hdcomputers.us/json/",{}, | |
function(data) { | |
//JS Goodness here! Your ip variable is data.ip | |
alert('Your IP Address is ' + data.ip) | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment