CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Need a Custom or Prewritten Perl Program?: I need a program that...:
Converts IP Addresses to Zip Codes

 



l008com
Novice

Aug 17, 2002, 8:07 PM

Post #1 of 11 (4324 views)
Converts IP Addresses to Zip Codes Can't Post

I have this program called Visual Route that, when you give it a URL or an IP, will visually show you the path your packets take from your IP to their IP, on a map. Including the town name and zip code of each point along the way. I'm wondering if there's a perl program out there (or any other language really) that can do nearly that, and simply return the zip code when given an IP address. That would be very cool. I could give people local weather without them telling me where they are.
Shocked


davorg
Thaumaturge

Aug 19, 2002, 12:57 AM

Post #2 of 11 (4316 views)
Re: [l008com] Converts IP Addresses to Zip Codes [In reply to] Can't Post

On a quick search thru CPAN, the closest I can come up with is Geo::IP which converts an IP address to the country name.

Even that will be horribly inaccurate as there is no reliable way to map an IP address to a location. Any softwre that tries to tell you otherwise is lying to you.

--
Dave Cross, Perl Hacker, Trainer and Writer
http://www.dave.org.uk/
Get more help at Perl Monks


fashimpaur
User

Aug 19, 2002, 5:00 AM

Post #3 of 11 (4315 views)
Re: [l008com] Converts IP Addresses to Zip Codes [In reply to] Can't Post

That would be neat. I would like to know how you do it if you do. I see a
problem with it for AOL users. AOL's central hub for processing is in Virginia. If I
am living in Chicago, and the IP address is for AOL (Virginia) how can it tell me
my weather since I am using dynamic IP addressing?

Just a thought,
Dennis

$a="c323745335d3221214b364d545".
"a362532582521254c3640504c3729".
"2f493759214b3635554c3040606a0",
print unpack"u*",pack "h*",$a,"\n\n";


l008com
Novice

Aug 19, 2002, 5:18 AM

Post #4 of 11 (4313 views)
Re: [fashimpaur] Converts IP Addresses to Zip Codes [In reply to] Can't Post

AOL Users Don't Count :-)

And yes, it can be done, look for the program called Visual Route, it does it.


davorg
Thaumaturge

Aug 19, 2002, 5:35 AM

Post #5 of 11 (4311 views)
Re: [l008com] Converts IP Addresses to Zip Codes [In reply to] Can't Post


In Reply To
And yes, it can be done, look for the program called Visual Route, it does it.


Like I said. Any program that says it can be done with any degree of accuracy is lying to you.

And example. What does Visual Route say for the IP address 158.152.136.193? This is the IP address that my home network has when connected to the internet.

It will probably give you the location of the company who the IP is assigned to. But that's not where that computer is. It's many miles away in my house.

And what about large ISPs who allocate IPs dynamically. The location of an IP address can move as one person disconnects and someone else is allocated that IP.

So, you can probably get the location of the company who owns the IP address, but that's not the same as knowing where the actual computer is.

--
Dave Cross, Perl Hacker, Trainer and Writer
http://www.dave.org.uk/
Get more help at Perl Monks


l008com
Novice

Aug 19, 2002, 3:26 PM

Post #6 of 11 (4309 views)
Re: [davorg] Converts IP Addresses to Zip Codes [In reply to] Can't Post

Docklands UK? How far away from you is that? And more importantly, how accurate is the docklands weather for where you are?


davorg
Thaumaturge

Aug 19, 2002, 10:29 PM

Post #7 of 11 (4309 views)
Re: [l008com] Converts IP Addresses to Zip Codes [In reply to] Can't Post

Yeah, well that's probably where my ISP have their main connectivity base. But that IP address could be anywhere in the UK.

As it happens, I'm also in London - so the weather is probably pretty accurate :)

--
Dave Cross, Perl Hacker, Trainer and Writer
http://www.dave.org.uk/
Get more help at Perl Monks


Paul
Enthusiast

Aug 22, 2002, 5:48 PM

Post #8 of 11 (4302 views)
Re: [davorg] Converts IP Addresses to Zip Codes [In reply to] Can't Post

How accurate is this?

http://snoop.anonymizer.com/cgi-bin/get_geography.cgi


fashimpaur
User

Aug 23, 2002, 10:30 AM

Post #9 of 11 (4296 views)
Re: [RedRum] Converts IP Addresses to Zip Codes [In reply to] Can't Post

Paul,

That showed Prospect Heights, IL. That's not bad for me, I'm in Wood Dale, IL.
But, how many people know that Prospect Heights is a suburb of Chicago and how
will the program make that determination. Also, we have users who could get
assigned this same IP address who work in Brandon, Florida. How accurate do you think 1008 can get the weather for them? Cool
Dennis

$a="c323745335d3221214b364d545".
"a362532582521254c3640504c3729".
"2f493759214b3635554c3040606a0",
print unpack"u*",pack "h*",$a,"\n\n";


(This post was edited by fashimpaur on Aug 23, 2002, 10:33 AM)


Paul
Enthusiast

Aug 23, 2002, 10:34 AM

Post #10 of 11 (4293 views)
Re: [fashimpaur] Converts IP Addresses to Zip Codes [In reply to] Can't Post

That wasn't really relating to the weather issue, it was just something I found a while back that related to the thread a little.


fashimpaur
User

Aug 23, 2002, 10:49 AM

Post #11 of 11 (4291 views)
Re: [RedRum] Converts IP Addresses to Zip Codes [In reply to] Can't Post

Understood. I just wanted to make the point for 1008 that this was why
we are all saying that the concept of mapping an IP address to Geographical
area for the intent of giving the user current weather information would be
an impractical and impossible task.

I do like that it worked the way that it did though.
Dennis

$a="c323745335d3221214b364d545".
"a362532582521254c3640504c3729".
"2f493759214b3635554c3040606a0",
print unpack"u*",pack "h*",$a,"\n\n";

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives