Jump to content


Photo
- - - - -

More geocode fun


  • Please log in to reply
12 replies to this topic

#1 ntheory

ntheory

    data pillager

  • Agents of the Revolution
  • 1,757 posts

Posted 25 May 2003 - 01:43 AM

This could be a very long story, but I'll cut to the (still long) chase.

I wanted to update the geocode information because someone (can't remember who) said that the info was out of date. So I poke around and stumble across the motherload. These guys are the real deal source for this kind of information. So, naturally, I download it all and start hacking.

I built an extended NPA-NXX database and updated my NPA page. I just realized that the UI changes from the previous version broke the command line client so I fixed that too. The older command line clients will need to be updated... actually, I could fix that, but I suppose it's no big deal for everyone to grab the new script since it has added functionality anyway.

So, if you check out my NPA page you'll notice the NXX box. If you only enter the NPA it uses the same database as before. If you enter NPA and NXX you'll get all kinds of neat info that you didn't get before (phreaks will recognize it, it's all magic to me).

For example I tried a random NPA-NXX (702-543). Apparently it's in Nevada. The script returns the following:

NPA-NXX: 702-543 State: NV UseCode: AS OCN: 2817 Company: PAC - WEST TELECOMM, INC. - NV RC: LAUGHLIN Switch: LSVKNV97DS0 IG: I


As before all the information is available for download. I converted their MDB to a MySQL friendly schema and table info (in one file), modified all the scripts and posted the source, and that's that.

Lemme know if anyone finds it useful (or anyone finds bugs of course). Oh, I'll update the use codes tomorrow so they're human readable.

#2 White_Raven

White_Raven

    That's so raven!

  • Banned
  • 1,597 posts

Posted 25 May 2003 - 02:10 AM

nice.. but you need to add a "Y" in the date() for the title. so it doesnt error out

#3 ntheory

ntheory

    data pillager

  • Agents of the Revolution
  • 1,757 posts

Posted 25 May 2003 - 02:21 AM

Ah. I totally forgot to check into that. It's fixed now.

Thanks!

#4 dual

dual

    BinRev veteran

  • Agents of the Revolution
  • 1,196 posts
  • Gender:Male

Posted 25 May 2003 - 03:00 AM

CLLI codes and everything... that is off the chain!

#5 ntheory

ntheory

    data pillager

  • Agents of the Revolution
  • 1,757 posts

Posted 25 May 2003 - 03:15 AM

Thanks. :)

These are the things that happen when you get extra large coffee with sugar and no milk...

#6 White_Raven

White_Raven

    That's so raven!

  • Banned
  • 1,597 posts

Posted 25 May 2003 - 04:47 AM

I was wondering what you where working on in irc, now I know.. lol we all have our projects, heh Iv been working hard too.

(I dont want to give up this borrowed laptop :( )

#7 phax

phax

    SUP3R 31337

  • Members
  • 187 posts

Posted 25 May 2003 - 06:06 AM

Handy little tool. Hmm.........Good database with lots of useful info and codes thanxs, NTheory:cool:

#8 Dox

Dox

    Hakker addict

  • Members
  • 537 posts

Posted 25 May 2003 - 10:52 AM

good stuff man.

i just have to add a bit of info about 807.
http://www.telcodata...te=ON&results=1

and some canadian info, it might come in handy, just incase you haven't seen it.
http://www.cnac.ca/index.htm

#9 StankDawg

StankDawg

    same old Dawg, no new tricks

  • Moderating Team
  • 8,073 posts
  • Country:
  • Gender:Male

Posted 25 May 2003 - 12:22 PM

As before all the information is available for download. I converted their MDB to a MySQL friendly schema and table info (in one file), modified all the scripts and posted the source, and that's that.

<homer>mmmmmmm.... database programming.... </homer>

nice addition...how big is the database in terms of filesize?

#10 White_Raven

White_Raven

    That's so raven!

  • Banned
  • 1,597 posts

Posted 25 May 2003 - 12:28 PM

And how easy will it be to update is the phone compony decides to start spliting NPA's again? I can just see the future, 5000 entries and 78% of them outdated.... :( :help: :(

Maybe a Admin setup that lets you add and edit parts of the table? I could do the styleing again if you do the rest... Still kinda busy trying to get everythign done while i still can but as always Im willing to help.

#11 ntheory

ntheory

    data pillager

  • Agents of the Revolution
  • 1,757 posts

Posted 25 May 2003 - 12:28 PM

Man, so many quick replies. Awesome.

Dox, I added Canada. It's in the new NPA-NXX.sql.bz2 file along with the vi ex commands I used to convert from their format to the NANPA format (so if you maintain it on your own machines you can just slap their file in vi, cut and paste the commands, and BAM... instant database schema switch).

Regarding the DB size for Stank... hmm. There's about 20k rows for Canada, 240k rows for the US. So as far as row count is concerned it's pretty small. The MySQL MYD file is 12MB for the main table, the other tables are all under 20k. I should probably add an index to it at this point. :P

Edit:

Now if we could get the Telcordia info we'd have a serious database. :)

#12 White_Raven

White_Raven

    That's so raven!

  • Banned
  • 1,597 posts

Posted 25 May 2003 - 12:35 PM

Well you know Iv been idling on irc.hakt.tk#chat while using this lappy, if you want my help just ask.

12megs? Already? wow.

#13 StankDawg

StankDawg

    same old Dawg, no new tricks

  • Moderating Team
  • 8,073 posts
  • Country:
  • Gender:Male

Posted 25 May 2003 - 03:48 PM

ntheory and i have already discussed having the database reside on the site somewhere so that updates can be made in a centralized location.

idealy, it would look in the local directory first, for the data, then look on the net. That way, if someone wanted to createa specialized database locally, they could. it also allows developement of 1 version of the software that looks in 2 places. that way, porting is easier.




BinRev is hosted by the great people at Lunarpages!