Copyright James Budiono 2013.
Distributed under GNU General Public License Version 3 or later
(http://www.gnu.org/licenses/gpl.html).

Intro
=====
This is a simple world-map stat counter.
It reads a bunch of IP addresses, and a world map in png format,
and output the same world map in jpeg format with markers where those 
IP address are located.

Dependency: fly (http://martin.gleeson.com/fly) and netpbm tools.
Data file: City IP address: http://dev.maxmind.com/geoip/legacy/geolite
(this file was used: http://geolite.maxmind.com/download/geoip/database/GeoLiteCity_CSV/GeoLiteCity-latest.zip ).

How to install
==============
1. Get the GeoIP Lite City database
2. Preprocess GeoIPLite-Block.csv GeoIPLite-Loc.csv using "convert.sh". 
   This uses 'preprocess' and 'printdat'.
   You will get ipinfo.dat & locinfo.dat, the binary representation of those
   two CSV files, which will be used by ipgeocode.
3. A sample map (from wikimedia) is provided (map.png), you can change this
   to others as needed.
4. Copy "ipgeocode", and "genimage.sh" to your cgi-bin directory, along with 
   the data files: ipinfo.dat, locinfo.dat, and map.png
5. Edit genimage.sh as needed to set the location of the executables and
   map image details (if you change the map image).
6. Make sure you have "fly" & netpbm installed somewhere.
7. Test your installation by feeding an IP address to genimage.sh like this:
   echo $INTERNET_FACING_IPADDRESS | ./genimage.sh > out.jpg and check that
   your own location is marked properly. If you don't know your Internet-
   facing-IP-address, visit icanhazip.com from your browser.
8. If it works, then configure your cgi script to call genimage.sh properly.
   genimage.sh reads IP addresses, one of each line, which will be marked on
   the map.
9. That's all!
10. If you have mawk, edit genimage.sh and change awk to mawk. That will give
    you a 3-fold speed increase.

All the source files are included. Static 32-bit binaries are also included,
so you don't need to compile. If you do need to re-compile, just run "make".

Enjoy,
James, June 2013.

Note: this is a newer version of worldvisitor. It combines findip and findloc
into one program: ipgeocode.
