Need help with maxmind geo ip php script
I am really new to php and trying to figure this out so I can get better results for whatstheirip.com. I need to convert every IP address to an IP number to use the GeoIp script from maxmind. Here is their formula to convert it:
ipnum = 16777216*w + 65536*x + 256*y + z
where
IP Address = w.x.y.z
So basically I need to convert an ip (lets use 24.24.24.24 as an example) to 4 different variables = w, x, y, z
How do I do this?
Ip address = $ip
|