Source

ip2cc /

Filename Size Date modified Message
clients
36 B
53 B
1.4 KB
3.2 KB
2.9 KB
6.1 KB
4.6 KB
4.7 KB
1.9 KB
		  ip2cc: Lookup country country by IP address
                  ===========================================

(c) 2002-2009 Denis S. Otkidach

WHAT IS IT

If you want to gather web statistics by countries (not by top-level
domains) or implement targeting, here is solution: ip2cc.  This module
allows to resolve country from IP address.

USAGE

update.py                   - build/update database
ip2cc.py <address>          - print country name for which
                              <address> is registered
update_ru.py                - build/update database of Russia regions
ip2ru.py <address>          - print Russia region name for which
                              <address> is registered
For example:
$ ./ip2cc.py python.org
python.org (194.109.137.226) is located in NETHERLANDS
$ ./ip2cc.py google.com.ru
google.com.ru (216.239.33.100) is located in UNITED STATES

Module can be used as CGI.

LICENSE

Python-style

ACKNOWLEDGEMENTS

Jason R. Mastaler
Fredrik Lundh

CHANGES

0.5	- ISO 3166-1 countries list is updated. Module to resolve Russia region
	  added.

0.4	- Added AfriNIC to sources.

0.3	- Due to bug in bsddb module (http://python.org/sf/788421) it's
	  rewritten to use very simple own database.

0.2	- Adopted to new format of registrars.
	- Added LACNIC to sources.
	- Fixed contry code map and added -check option to simplify
	  maintainance.

0.1	- Initial release