caozha-ip is a complete IP address transfer module written based on native PHP. It supports automatic acquisition of IP and query of specified IP. It also supports output of json, jsonp, text, xml, js and other IP and address formats. It also supports It can be subdivided into countries, provinces, cities, and regions to facilitate integration and use in various systems. The database uses MYSQL, and the IP address data comes from the Innocence IP database, etc.
How to use caozha-ip MYSQL version:
1. Import src/caozha_ip.sql.zip into the MYSQL database.
2. Configure the src/caozha_ip.class.php database information.
3. Reference examples: examples/ (contains multiple calling methods)
NoSQL version (no database required):
1. Introduce src-NoSQL/caozha_ip.class.php
2. Reference example: examples/NoSQL.php
IP data update method:
MYSQL version:
1. Download the latest version of the Innocence IP database from the Internet. After installation, open the software and click "Unzip" to get the file: qqwry.txt and place it in the directory convert/.
2. Modify the database configuration in convert/convert.php, run this PHP program, and perform the corresponding operations to complete the update of IP data.
NoSQL version (no database required):
Download the latest version of the Innocence IP database online. After installation, open the software installation directory, find qqwry.dat, and place it in the directory src-NoSQL/ to overwrite the old data file.