Did you see the city, state and country, and even the network the IP address comes from? That is a service offered by IP2Location
But what you might need to know is that there is no standard method of looking at an IP address and saying where it is from.
The IP numbers are not like Longitude and Lattitude coordinates that point to specific places on earth. They are just numbers assigned to
large computers or servers. The information about them depends on who purchased them.
If the IP address 3.239.242.55 is owned by ABC Telecom and I know that the company is registered in UK and
the server serves people in London, I will save those information to my database and whenever I receive visitors with this same address, I will
just believe they are in the same location the server is.
But people from elsewhere can connect to servers in a far away country, that is why IP to location service is not very
reliable. It is like a guess work. To configure your IP to show that you are from another country, use a browser like Mozilla,
go to spys.ru/en and get any working IP address. Paste the IP and Port in your Mozilla Network option settings and configure it to use
the manual settings for all connections, then the IP to location service will guess wrongly.
If you used an IP from China while you are in New York, any website you visit will say Hwang Ho! Thinking you are from China!