ThinkDing  

Acceptance Mark
User Name
Password


tdIP2C - PHP MySQL IP to Country Script

There is no demo for this script. Once you install and run the script, numbers will print to let you know what row is being inserted. As of 2005-07-16, the tdIP2C script inserted 68,276 rows!

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)



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


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