Skip to content

Instantly share code, notes, and snippets.

@Hunter-Dolan
Created January 8, 2011 02:30
Show Gist options
  • Save Hunter-Dolan/770469 to your computer and use it in GitHub Desktop.
Save Hunter-Dolan/770469 to your computer and use it in GitHub Desktop.
Json IP jQuery Script
<!--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