Easy way to get an IP with JavaScript

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Mikhus
    New Member
    • Feb 2012
    • 1

    #1

    Easy way to get an IP with JavaScript

    Easy way is this one. Combine http://smart-ip.net/geoip as JSON and jQuery:

    Code:
    $(document).ready( function() {
        $.getJSON( "http://smart-ip.net/geoip-json?callback=?",
            function(data){
                alert( data.host);
            }
        );
    });
Working...