Home > Backend Development > PHP Tutorial > IP interface API interface query

IP interface API interface query

WBOY
Release: 2016-07-25 08:48:57
Original
1153 people have browsed it
IP interface query
http://api.apidatas.com/ip/doc

Interface description

IP geographical location call, this interface is not pure data, compared with any other data on the market, but... it cannot be completely 100% accurate!!! Unlimited calls can be made!!!

Interface address
http://api.apidatas.com/ip/
Interface parameters
http://api.apidatas.com/ip/127.0. 0.1
http://api.apidatas.com/ip?ip=127.0.0.1
Interface type
http://api.apidatas.com/ip/127.0.0.1/json
http://api.apidatas.com /ip/127.0.0.1/js
The default interface is JSON format (XML format is not provided yet)
If you want to use JS calls to display IP, then we recommend:

Return data
Name return type description is empty, return 0
country string country or IANA (computer reserved address) If it is empty, it returns 0
area string Region: East China, Central China, East China... If it is empty, it returns 0
region string Province: Beijing, Shanghai, Shandong... If it is empty, it returns Returns 0
city string City: Hangzhou, Wuxi, Laiwu... If it is empty, it returns 0
county string If it is empty, it returns 0
isp string Operator: If it is empty, it returns 0
Error code
Name error code description
state 10000 IP input error
  1. //Return JSON data
  2. {"country":"IANA","area":"0","region":"0","city":"0","county":"0" ,"isp":"0"}
Copy code
  1. //Return JS code
  2. var API_IP=["country":"u4fc4u7f57u65af","area":"0","region":"0","city":"0","county": "0","isp":"0"];
Copy code


Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template