Read on before you say this is a duplicate, it\'s not. (as far as I could see)
I want to get the county code in php from the client.
Yes I know you can do th
MaxMind provide a free PHP GeoIP country lookup class (there is also a free country+city lookup one).
The bit you want is what is mentioned under "Pure PHP module". This doesn't require you to install anything, or be dependent on them, nor does it need any special PHP modules installed. Just save the GeoIP data file somewhere, then use their provided class to interact with it.