{
"dtime": "2023-01-30 01:15:33",
"ukey": "643b4682ddc002b6aec7d178084bbad79bb5093b5b80246af3d43aacd4a57187",
"ip": "240e:34c:80:9340:2071:489f:f73c:1d0c",
"md5": "05f3dc8a944412ff7d5d692d35924548"
}
返回参数说明
Code: 状态 Good / Bad
iptype:ip版本 "IPv4 / IPv6"
ip:查询的IP地址
isp:运营商相关
ip_location:ip地理位置
lat:经纬度信息
data_src:IP信息来源
jzstr:随机鸡汤语句
Datatime:数据返回时间
{
"Code": "Good",
"iptype": "IPv4",
"ip": "42.243.58.129",
"isp": "电信",
"ip_location": "中国云南省昆明市五华区",
"lat": "102.712251,25.040609",
"data_src": "IT小圈API",
"jzstr": "星光不问赶路人,时光不负有心人",
"Datatime": "2023-02-02 20:24:22"
}
// 需要引用 jQuery : https://jian.deyun.fun/js/jquery-3.5.1.js
// 计算md5,需要引用 md5 库: https://cdn.bootcss.com/blueimp-md5/2.10.0/js/md5.js
var dtime1 = '2023-02-02 15:01:54';
var ukey1 = '643b4682ddc002b6aec7d178084bbad79bb5093b5b80246af3d43aacd4a57187';
var ip1 = '42.243.58.129';
// md5(dtime1+ukey1) ==> aef974392fc21c03c25dd3e26c093536
var md5s = 'aef974392fc21c03c25dd3e26c093536';
var json_data = {"dtime":dtime1,"ukey":ukey1,"ip":ip1,"md5":md5s};
$.ajax({
type: "post",
url: "https://ip.iquan.fun/getip.php",
dataType: "json",
data: JSON.stringify(json_data),
success: function (data){
// 您处理返回 json 的代码
document.write(JSON.stringify(data));
}
});
curl -s -H "Content-Type: application/json;charset=UTF-8" -X POST -d '{"dtime": "2023-01-30 01:15:33","ukey": "643b4682ddc002b6aec7d178084bbad79bb5093b5b80246af3d43aacd4a57187","ip": "240e:34c:80:9340:2071:489f:f73c:1d0c","md5": "05f3dc8a944412ff7d5d692d35924548"}' https://ip.iquan.fun/getip.php
$url = "https://ip.iquan.fun/getip.php";
$json_data = '{"dtime": "2023-01-30 01:15:33","ukey": "643b4682ddc002b6aec7d178084bbad79bb5093b5b80246af3d43aacd4a57187","ip": "240e:34c:80:9340:2071:489f:f73c:1d0c","md5": "05f3dc8a944412ff7d5d692d35924548"}';
$curl = curl_init($url);
curl_setopt($curl, CURLOPT_HEADER, false);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_HTTPHEADER, array("Content-type: application/json"));
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $json_data);
$result = curl_exec($curl);
curl_close($curl);