You can't do it.
Remember, the IP is assigned by the ISP, and in most cases is not fixed - it is a dynamic IP address. What this means is that the IP address "78.145.xxx.xxx" is currently assigned to me, but if I disconnect my modem, and reconnect it could be assigned to someone 200 miles away.
In order to get the zip/post code from the IP, the ISP would have to translate it via their customer database. This isn't going to happen, without a court order - that kind of information is commercially confidential (it's their customer list!) and they won't hand it over in case you target their customers with cheaper offers.
In theory, you can get the city, but in practice, you will get A city - it could be hundreds of miles or more from the physical location of the PC using the IP address. And that's ignoring proxies...
I have thought same - "Dynamic IP"
That cleared the Vision now...
However I have couple of doubts, would you please look in the cases I have explained below.
In below case we are not considering customers privacy as you have explained, Then
ISP have assigned dynamic ip temporarily to a user for a some amount of time then that IP would hold some location(temporaritly)!! And that location would be the related for that Address(Physical) for sometime only.
So for that particular amount of time atleast can we have the Zipcode of that IP address??
Atleast can we have their City information if the IP is dynamic?
Thanks - Gandalf - The White 14 mins ago"
1) No, you can't - the ISP is the ONLY person who has that, and they will NOT give it to you until they are legally forced to do so. In some countries it is illegal for them to give you that information! (Data protection / privacy legislation)
2) You can get the City information, but is won't necessarily be accurate. For example, my City comes back as Berlin, Germany - I am in Wales, and hundreds of miles away (it would take about 24~36 hours to drive to Berlin) For what it's worth: hostip.info
] have an API and examples.
"Gutan Tag Griff,
Now it gets clear completely, as ISPs are authorities those won't allow to get leak their customer information in their code of conduct under privacy legislation. So true...
So the API that you have mentioned is(hosip.info) to get city information from IP is Free?(as right now I can not open the link(blocked by firewall)). If it is free then It might solve my purpose upto some extent. Though its not accurate but it will have something show atleast.
Vielen Dank fur eure Hilfe
Permalink | Bookmark | Improve Answer |
Posted 1 hr ago
Gandalf - The White2.1K"
Yes, it is a community based project, so there is no charge.
By the way, don't use the "Add Answer" to reply - use the "Add Comment"
below the answer instead. That way, I get an email. If you use "Add
answer" then you are the only person who could get an email...