I have include a iptocountry php file which give now the country... Thank you for indicating me of possible errors.
Which is flawed because this method of IP address to geo location is not 100% accurate.
When I was a BT Internet customer, the ISP for BT Internet was Yahoo who uses servers in the USA and therefore all the UK Yahoo ISP users have an IP address block in the USA when they are in the UK. That is just one ISP and one customer amongst millions.
Addressing of blocks is not sequential, a country will not have a single contiguous block, it will have 100's to 1000's of blocks that are allocated in small sequences.
A proxy server breaks any ip to geo location detection.
I will give you an idea of how far off geo location by this method is, Yahoo and other sites seem to think I live in Maidenhead, Kent. Nope, sorry, never lived in Kent, I have an Aunt that lives near to Maidenhead that I haven't seen in 36 years, but I don't live in Maidenhead, I live about 2 hours drive north in the East Midlands.
Word to the wise, do not rely on this method of fixing your users location.