Help - Search - Members - Calendar
Full Version: Finding A City Based On Ip
BleepingComputer.com > Internet & Networking > Web Site Development
   
Billy O'Neal
Hello.

I am trying to get a city associated to an IP address from a php script, similar to what is shown in the second main image on this page:
http://www.danasoft.com/

Anyone know how to do that?

Billy3
groovicus
Sure. Easy as pie. One looks for a web service that returns a location based on ISP. Popfly has a block that does just that.
Billy O'Neal
Hello, groovicus.

Thanks for the heads up.

Alright... this is way more work than I should be pouring into a forum signature smile.gif

It seems about half the services I find think I'm located in Memphis.

I tried popfly's module, but it only outputs lattitude and longitude, not city.

Don't worry about it, it's not a big deal smile.gif It appears I can mimic the first image on that site, but not the second without paying for a database, or spending a lot of time coding stuff.

Since you're an admin:
Does BC.com have a policy for or against these type of things?

I have it in my signature to emphasize the security aspects of using the internet, but if there's a problem, I don't want to leave something there that will be considered bad smile.gif

http://billy-oneal.com/Dynamic/someimage.php

(MOD_REWRITE redirects from http://billy-oneal.com/Dynamic/sig.png as well)

Billy3
groovicus
No, but it really freaks people out when one does that. Those type of signatures were really popular a few years ago. Besides, your rationale of "highlighting security risks" is not a valid argument. Knowing someone's IP address is in no way a security risk, so why insinuate something that is not true? In other words, it is a bad idea, and I don't want to have to deal with the flood of pms from people concerned that you somehow 'hacked' into their computers, or worried that you are some sort of a cyber-stalker.

THe correct block to use is the Host-to-IP block, and it outputs city, state, country, latitude, and longitude. I used it in a mashup, and it works just fine.
Billy O'Neal
QUOTE
Besides, your rationale of "highlighting security risks"

I know that's not a security risk. I do, however, think that they should know that information is posted by their browser everywhere they go.

QUOTE
I don't want to have to deal with the flood of pms from people concerned that you somehow 'hacked' into their computers, or worried that you are some sort of a cyber-stalker.

Removing now.... Done.

QUOTE
...Host-to-IP block...

Thanks!

Billy3
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.