Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

Finding A City Based On Ip


  • Please log in to reply
4 replies to this topic

#1 Billy O'Neal

Billy O'Neal

    Visual C++ STL Maintainer


  • Malware Response Team
  • 12,304 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Redmond, Washington
  • Local time:06:10 AM

Posted 19 June 2008 - 10:16 PM

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
Twitter - My statements do not establish the official position of Microsoft Corporation, and are my own personal opinion. (But you already knew that, right?)
Posted Image

BC AdBot (Login to Remove)

 


#2 groovicus

groovicus

  • Security Colleague
  • 9,963 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Centerville, SD
  • Local time:07:10 AM

Posted 19 June 2008 - 10:45 PM

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.

#3 Billy O'Neal

Billy O'Neal

    Visual C++ STL Maintainer

  • Topic Starter

  • Malware Response Team
  • 12,304 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Redmond, Washington
  • Local time:06:10 AM

Posted 20 June 2008 - 12:06 AM

Hello, groovicus.

Thanks for the heads up.

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

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 :flowers: 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 :trumpet:

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

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

Billy3
Twitter - My statements do not establish the official position of Microsoft Corporation, and are my own personal opinion. (But you already knew that, right?)
Posted Image

#4 groovicus

groovicus

  • Security Colleague
  • 9,963 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Centerville, SD
  • Local time:07:10 AM

Posted 20 June 2008 - 08:29 AM

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.

#5 Billy O'Neal

Billy O'Neal

    Visual C++ STL Maintainer

  • Topic Starter

  • Malware Response Team
  • 12,304 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Redmond, Washington
  • Local time:06:10 AM

Posted 20 June 2008 - 10:32 AM

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.

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.

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

Thanks!

Billy3
Twitter - My statements do not establish the official position of Microsoft Corporation, and are my own personal opinion. (But you already knew that, right?)
Posted Image




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users