一些可以查询IP地理位置、身份证所在地、手机归属地的接口。
由于某些接口需要提供来路,所以以下代码如果JS不能直接读取,可以通过PHP来返回结果,然后再通过JS调用返回结果的页面。
源码与演示:源码出处 演示出处
01 |
02 | /* |
03 | 新浪的IP查询接口: |
04 | 新浪的:http://counter.sina.com.cn/ip?ip=IP地址 |
05 | 返回Js数据,感觉不是很精确,可以把问号后面的去掉,直接返回本机对应的IP所在地 |
06 |
07 | 有道的IP查询接口: |
08 | 返回XML数据:http://www.yodao.com/smartresult-xml/search.s?type=ip&q=0.0.0.0 |
09 | 返回JSON数据:http://www.yodao.com/smartresult-xml/search.s?jsFlag=true&type=ip&q=0.0.0.0 |
10 | 把0.0.0.0换成需查询的IP地址即可,这个应该是用纯真的数据库 |
11 |
12 | 太平洋电脑网IP查询接口: |
13 | http://whois.pconline.com.cn/?ip=0.0.0.0 |
14 | 把0.0.0.0换成IP地址,页面上还有其他无关内容,这些内容是告诉我们哪些接口可以调用、接口调用参数和使用方法等 |
15 |
16 | 查询手机号码归属地接口: |
17 | 返回XML数据:http://www.youdao.com/smartresult-xml/search.s?type=mobile&q=13888880000 |
18 | 返回JSON数据:http://www.youdao.com/smartresult-xml/search.s?jsFlag=true&type=mobile&q=13888880000 |
19 |
20 | 身份证查询接口: |
21 | 返回XML数据:http://www.youdao.com/smartresult-xml/search.s?type=id&q=身份证号 |
22 | 返回JSON数据:http://www.youdao.com/smartresult-xml/search.s?jsFlag=true&type=id&q=身份证号 |
23 | */ |
24 | echo file_get_contents("接口网址和参数"); |
25 | ?> |

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

MantisBT
Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

mPDF
mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment