<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
</head>
<body>
<script type="text/javascript">
jQuery(document).ready(function($){
$.getJSON( "http://ip-api.com/json", function( data ) {
var items = [];
$.each( data, function( key, val ) {
if ( key == 'zip' ){
alert( key + ": " + val );
}
});
});
});
</script>
</body>
</html>
fot https:
$.getJSON("https://api.ipify.org?format=json", function (data) {
$("#info").html("IP: " + data.ip + "");
//var ips = data.ip;
var ips = '72.229.28.185';
$.getJSON( "https://ipapi.co/"+ips+"/json/", function( data ) {
$.each( data, function( key, val ) {
//alert ( key + '//' + val);
if ( key == 'postal' ){
Comments
Post a Comment