ThinkDing  

Acceptance Mark
User Name
Password


tdIP2C - PHP MySQL IP to Country Script

tdIP2C: ThinkDing is offering a PHP IP2Country script that uses a MySQL backend. This script creates a database table of 12 fields and around 65K rows (scroll down for an example). The data used by this script is in IPv4 address range format and comes from the NICs. This script does not check the accuracy of the NICs data. Rather, this script reads, formats, and inserts data into a MySQL database table. Once you run this script, you have a MySQL table containing over 65,000 rows!

This IP2Country script is a stand alone program; it does not come with a search, ads, or index script. If you have questions, please ask before you buy.

Notes: While the NICs endeavour to the best of their ability to ensure the accuracy of their information, they make no guarantee in this regard. As such, the data are not to be considered an authoritative statement of IPs and locations. Users may have an altered IP, users may live in one country and receive service from an ISP in another country, businesses may have networking arrangements, etcetera. Thus, using the data for IP to country mapping may result in inaccuracies.

Example of database table content inserted from script...

column1: date script ran
column2: the listed NIC
column3: country/area code
column4: country/area name
column5: IP start number
column6: IP end number
column7: CIDR form of IP
column8: alternative IP start
column9: alternative IP end
column10: length between IPs
column11: registry date
column12: the status

mysql> select * from table where column3 = 'US' order by column7 asc limit 5;
+------------+---------+--------+---------------+-------------+-----------------+-
---------------+------------+------------+----------+------------+------------+
| column1    | column2 | column3 | column4       | column5     | column6         |
column7        | column8    | column9    | column10 | column11   | column12  |
+------------+---------+--------+---------------+-------------+-----------------+-
---------------+------------+------------+----------+------------+------------+
| 2005-07-16 | ARIN    | US      | UNITED STATES | 11.0.0.0    | 11.255.255.255  |
11.0.0.0/8     |  184549376 |  201326591 | 16777216 | 1984-01-19 | ALLOCATED |
| 2005-07-16 | ARIN    | US      | UNITED STATES | 12.0.0.0    | 12.255.255.255  |
12.0.0.0/8     |  201326592 |  218103807 | 16777216 | 1983-08-23 | ALLOCATED |
| 2005-07-16 | ARIN    | US      | UNITED STATES | 128.1.0.0   | 128.1.255.255   |
128.1.0.0/16   | 2147549184 | 2147614719 |    65536 | 1991-11-20 | ALLOCATED |
| 2005-07-16 | ARIN    | US      | UNITED STATES | 128.10.0.0  | 128.10.255.255  |
128.10.0.0/16  | 2148139008 | 2148204543 |    65536 | 0000-00-00 | ASSIGNED  |
| 2005-07-16 | ARIN    | US      | UNITED STATES | 128.101.0.0 | 128.101.255.255 |
128.101.0.0/16 | 2154102784 | 2154168319 |    65536 | 0000-00-00 | ASSIGNED  |
+------------+---------+--------+---------------+-------------+-----------------+-
---------------+------------+------------+----------+------------+-----------+
5 rows in set (0.30 sec)

mysql> select count(*) from table;
+----------+
| count(*) |
+----------+
|    68276 |
+----------+
1 row in set (0.00 sec)

If you have questions, please ask before you buy.

Requirements: PHP 4.3.x+ and MySQL 4.0.x+ highly recommended; PHP 4.1.2+, MySQL 3.23.47+, and CSS support required. Further, PHP configured with allow_url_fopen set to ON and max_execution_time set to at least 300 seconds are required.

Pricing: $10.00 USD (includes one-year access to download from members area).

By purchasing ThinkDing software, you are agreeing to the below License Agreement and Terms of Use. After successful completion of the PayPal purchase process, you are given access to immediately download the software you purchased in ZIP format. Note that purchases are available through 2CheckOut upon request.

ThinkDing License Agreement: Software herein is defined to include all of the ThinkDing LLC files and supporting documentation. ThinkDing LLC software is not free software and is not open source software. All rights to the ThinkDing LLC software not expressly granted under this license are reserved to ThinkDing LLC.

Copies of Software: Only one copy of a licensed version of ThinkDing LLC software may used on one website for each license purchased. Multiple licenses must be purchased to use ThinkDing LLC software at multiple locations.

Access to Software: A subscription grants the licensee access to the members area where newer versions of the software may be downloaded for one year from the date of purchase. After a subscription expires, licensee may continue to use, according to the terms of this license, the last version of the software that licensee downloaded prior to subscription expiration, or make another purchase to gain access to the latest version.

Distribution of Software: Distributing the ThinkDing LLC software, commercial or otherwise, without prior written permission from ThinkDing LLC, is strictly forbidden, regardless of whether the licensee modifies the software.

Copyright of Software: All copyright notices, including links, contained in the ThinkDing LLC software must remain unchanged and visible at all times, unless a branding free option was purchased.

Branding Free Option: A branding free option allows licensee to remove the copyright notices, including links, that are present when viewing a webpage. Copyright notices in the source code itself must not be removed.

URL to Website: All licensees must submit the URL where the software will be used, and must keep this URL up to date. The URL may be submitted via the members area.

License Transfers or Refunds: Sale prices or price reductions are not applied retroactively. Fees are non-refundable, and the license is non-transferable, regardless of whether the licensee installs the ThinkDing LLC software.

Revocation of License: If any of the terms of this license are violated, ThinkDing LLC reserves the right to revoke the license at any time.

Changes to License: Any or all terms of this license may be modified at any time.

Disclaimer of Warranty: THE SOFTWARE AND ACCOMPANYING DOCUMENTATION ARE PROVIDED "AS IS" AND WITHOUT ANY WARRANTIES AS TO PERFORMANCE, MERCHANTABILITY, FITNESS OR OTHER PURPOSES, WHETHER EXPRESSED OR IMPLIED. ALL EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. THE LICENSEE MUST ASSUME THE ENTIRE RISK OF USING THE SOFTWARE. IN NO CASE SHALL THINKDING LLC OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, CONSEQUENTIAL, OR OTHER DAMAGES OR LOSS, INCLUDING, WITHOUT LIMITATION, LOST PROFITS OR THE INABILITY TO USE EQUIPMENT OR ACCESS DATA, WHETHER SUCH DAMAGES ARE BASED UPON A BREACH OF EXPRESS OR IMPLIED WARRANTIES, BREACH OF CONTRACT, NEGLIGENCE, STRICT TORT, OR ANY OTHER LEGAL THEORY. THIS IS TRUE EVEN IF THINKDING LLC OR ITS CONTRIBUTORS IS ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. IN NO CASE WILL THE LIABILITY OF THINKDING LLC OR ITS CONTRIBUTORS EXCEED THE AMOUNT OF THE LICENSE FEE PAID BY LICENSEE TO THINKDING LLC. ANY LIABILITY OF THINKDING LLC OR ITS CONTRIBUTORS IS LIMITED EXCLUSIVELY TO PRODUCT REPLACEMENT OR REFUND OF THE PURCHASE PRICE. THINKDING LLC OR ITS CONTRIBUTORS IS NOT LIABLE FOR ANY CONTENT DISPLAYED ON A WEBSITE POWERED BY THINKDING LLC SOFTWARE. THIS LICENSE SHALL BE GOVERNED BY THE LAWS OF THE STATE OF PENNSYLVANIA.

Network Information Center Terms of Use: The NIC files (AFRINIC, APNIC, ARIN, LACNIC, RIPE) are freely available for download and use on the condition that the NICs will not be held responsible for any loss or damage arising from the use of the information contained in their reports. The NICs endeavour to the best of their ability to ensure the accuracy of their reports; however, the NICs makes no guarantee in this regard. In particular, it should be noted that the NIC reports seek to indicate where resources were first allocated or assigned. It is not intended that the NIC reports be considered as an authoritative statement of the location in which any specific resource may currently be in use.



All times are GMT. The time now is 01:42 PM.


Powered by: vBulletin Version 3.0.7
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright © 2001 - 2005, ThinkDing LLC. All Rights Reserved.