How PHP obtains the IP of the client and the province
Source: Internet
Author: User
How PHP obtains the client's IP and the local province
For specific implementation code. Thank you..
------Solution--------------------
Provides several IP address APIs
Sina's IP address query interface: HTTP://INT.DPOOL.SINA.COM.CN/IPLOOKUP/IPLOOKUP.PHP?FORMAT=JS
Sina another IP address query interface: HTTP://COUNTER.SINA.COM.CN/IP
Sina Multi-Region test method: http://int.dpool.sina.com.cn/iplookup/iplookup.php?format=js&ip=218.192.3.42
Sohu IP Address Query interface (default GBK): Http://pv.sohu.com/cityjson
Sohu IP Address Query interface (can be set code): Http://pv.sohu.com/cityjson?ie=utf-8
Sohu additional IP Address query interface: HTTP://TXT.GO.SOHU.COM/IP/SOIP
------Solution--------------------
1. You can build your own IP library, data can be extracted from a packet like innocence
2. Get the IP code online a whole bunch of copies here one
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.