how it works?
now we have 2 tables, but how does this work. The first table we need is the blocks table.
The first step is to build an ipnumber from the ip.
This is quite easy. For example the ip is 61.88.114.12
61 * 16777216 + 88 * 65536 + 114 * 256 + 12 = 1029206540
Now we have an so caled IP number. With this ip number we are able to search the
right locationID in the blocks table. For Example a simple sql string:
SELECT locID FROM blocks WHERE startIpNum <= <ipnumber> AND endIpNum >= <ipnumber>
Now we have the locID. With this location ID we can select the right location from
the location Table. Like this:
SELECT * FROM location WHERE locID = <locID>
Its also possible to use an join!

