Hi from spain, sorry for my english, i saw that in the data base of
slim stat save the ip as varchar 15... this is very wrong for 2
reasons:
1. is a varchar, size is more than int.
2. IPv6??
So, i maked a little snippet that you can costomize. For ip4 its easy,
ip2long, for ip6 first need convert to binary, later need convert to
integer the half of binary string, because this part in int its a int
that you can store in a bigint column.... for this reason you need 2
colums for IP (BIGINT), if the second is null, the ip is ip4
The script have comments, but in spanish, you can translate.
http://pastebin.com/mBmigJL0
See you!! ;)