<?php
/*
新浪的IP查詢接口:
新浪的:http://counter.sina.com.cn/ip?ip=IP地址
返回Js數(shù)據(jù),感覺不是很精確,可以把問號后面的去掉,直接返回本機對應(yīng)的IP所在地
有道的IP查詢接口:
返回XML數(shù)據(jù):http://www.yodao.com/smartresult-xml/search.s?type=ip&q=0.0.0.0
返回JSON數(shù)據(jù):http://www.yodao.com/smartresult-xml/search.s?jsFlag=true&type=ip&q=0.0.0.0
把0.0.0.0換成需查詢的IP地址即可,這個應(yīng)該是用純真的數(shù)據(jù)庫
太平洋電腦網(wǎng)IP查詢接口:
http://whois.pconline.com.cn/?ip=0.0.0.0
把0.0.0.0換成IP地址,頁面上還有其他無關(guān)內(nèi)容,這些內(nèi)容是告訴我們哪些接口可以調(diào)用、接口調(diào)用參數(shù)和使用方法等
查詢手機號碼歸屬地接口:
返回XML數(shù)據(jù):http://www.youdao.com/smartresult-xml/search.s?type=mobile&q=13888880000
返回JSON數(shù)據(jù):http://www.youdao.com/smartresult-xml/search.s?jsFlag=true&type=mobile&q=13888880000
身份證查詢接口:
返回XML數(shù)據(jù):http://www.youdao.com/smartresult-xml/search.s?type=id&q=身份證號
返回JSON數(shù)據(jù):http://www.youdao.com/smartresult-xml/search.s?jsFlag=true&type=id&q=身份證號
*/
echo file_get_contents("接口網(wǎng)址和參數(shù)");
?>
/*
新浪的IP查詢接口:
新浪的:http://counter.sina.com.cn/ip?ip=IP地址
返回Js數(shù)據(jù),感覺不是很精確,可以把問號后面的去掉,直接返回本機對應(yīng)的IP所在地
有道的IP查詢接口:
返回XML數(shù)據(jù):http://www.yodao.com/smartresult-xml/search.s?type=ip&q=0.0.0.0
返回JSON數(shù)據(jù):http://www.yodao.com/smartresult-xml/search.s?jsFlag=true&type=ip&q=0.0.0.0
把0.0.0.0換成需查詢的IP地址即可,這個應(yīng)該是用純真的數(shù)據(jù)庫
太平洋電腦網(wǎng)IP查詢接口:
http://whois.pconline.com.cn/?ip=0.0.0.0
把0.0.0.0換成IP地址,頁面上還有其他無關(guān)內(nèi)容,這些內(nèi)容是告訴我們哪些接口可以調(diào)用、接口調(diào)用參數(shù)和使用方法等
查詢手機號碼歸屬地接口:
返回XML數(shù)據(jù):http://www.youdao.com/smartresult-xml/search.s?type=mobile&q=13888880000
返回JSON數(shù)據(jù):http://www.youdao.com/smartresult-xml/search.s?jsFlag=true&type=mobile&q=13888880000
身份證查詢接口:
返回XML數(shù)據(jù):http://www.youdao.com/smartresult-xml/search.s?type=id&q=身份證號
返回JSON數(shù)據(jù):http://www.youdao.com/smartresult-xml/search.s?jsFlag=true&type=id&q=身份證號
*/
echo file_get_contents("接口網(wǎng)址和參數(shù)");
?>