Google USA Residential PhoneBook

By FordLawnmower on Jan 26, 2010

This is a dialog that uses google's new PhoneBook feature to search for address/phone numbers.

To use it just load, right click any screen and click Google PhoneBook.

Once you have the dialog on the screen, just type your search words in the box and click search.
Each search will only return a maximum of 30 results. To see more results click next page. To go back click previous page.

To view the map click Open Map in Browser.

Image

Google PhoneBook search by Ford_Lawnmower irc.mindforge.org #USA-Chat
menu * {
  Google PhoneBook: dialog $iif($dialog(PhoneBook),-v,-md) PhoneBook PhoneBook
}
alias -l PhoneBook {
  if ($sock(PhoneBook)) { sockclose PhoneBook }
  sockopen PhoneBook www.google.com 80
  sockmark PhoneBook $+(/search?q=,$replace($2-,$chr(32),+,$chr(44),$+(%,2C)),&hl=en&rls=en&pb=r&start=,$calc($1 * 30),&sa=N)
}
On *:sockopen:PhoneBook*: {
  if (!$sockerr) {
    did -r PhoneBook 12-19
    sockwrite -nt $sockname GET $gettok($sock($sockname).mark,1,32) HTTP/1.0
    sockwrite -n $sockname Host: www.google.com
    sockwrite -n $sockname $crlf
  }
  else { echo -st Socket Error $nopath($script) | sockclose $sockname | return }
}
On *:sockread:PhoneBook*: {
  if ($sockerr) { echo -st Socket Error $nopath($script) | sockclose $sockname | return }
  else {
    var %PhoneBook | sockread %PhoneBook
    if ($regex(%PhoneBook,/<td>([^<]*)<b>([^<]*)<\/b><td>([^<]*)<td>([^<]*)<b>([^<]*)<\/b>([^<]*)<td\sid=mr>/g)) { 
      var %counter 0
      while (%counter < $regml(0)) {
        var %first $regml($calc(1 + %counter)), %last $regml($calc(2 + %counter)), %phone $regml($calc(3 + %counter))
        var %street $regml($calc(4 + %counter)), %citystate $regml($calc(5 + %counter)), %zip $regml($calc(6 + %counter))
        if ($dialog(PhoneBook)) {
          did -a PhoneBook 12,13 %first %last
          did -a PhoneBook 14 %phone
          did -a PhoneBook 15 %street
          did -a PhoneBook 16 $gettok(%citystate,1,44)
          did -a PhoneBook 17 $gettok(%citystate,2,44)
          did -a PhoneBook 18 %zip
          did -a PhoneBook 19 $replace($+(http://maps.google.com/maps?li=rwp&q=,%street,+,%citystate,+,%zip),$chr(32),+,++,+)
        }
        inc %counter 6
      }
    }
  }
  if (</body> isin %PhoneBook) { did -c PhoneBook 12-19 1 }
}
dialog PhoneBook {
  title "Residential Phone Book"
  size -1 -1 258 148
  option dbu
  combo 1, 8 8 198 9
  button "Search", 2, 212 7 37 12
  text "Name:", 3, 7 33 25 8, right
  text "Phone:", 4, 7 47 25 8, right
  text "Street:", 5, 7 62 25 8, right
  text "City:", 6, 7 76 25 8, right
  text "State:", 7, 7 90 25 8, right
  text "Zip Code:", 8, 7 105 25 8, right
  text "Map Link:", 9, 7 120 25 8, right
  text "Results Page:", 10, 147 23 45 8, right
  text "", 11, 197 23 25 8
  list 12, 147 33 104 97, vsbar
  combo 13, 41 33 98 9
  combo 14, 41 47 98 9
  combo 15, 41 62 98 9
  combo 16, 41 76 98 9
  combo 17, 41 90 98 9
  combo 18, 41 105 98 9
  combo 19, 41 120 98 9
  button "Open Map in Browser", 20, 42 132 97 12
  button "<< Previous Page", 21, 148 132 49 12
  button "Next Page >>", 22, 203 132 48 12
}
On *:Dialog:PhoneBook:Sclick:2,12,20-22: {
  if ($did == 2) && ($did($dname,1).text) { PhoneBook 0 $v1 | did -a $dname 11 1 }
  elseif ($did == 12) { did -c $dname 13-19 $did($dname,12).sel }
  elseif ($did == 20) { url -an $did($dname,19).seltext }
  elseif ($did == 21) { 
    did -a $dname 11 $calc($did($dname,11).text - 1)
    Phonebook $did($dname,11).text $did($dname,1).text
  }
  elseif ($did == 22) { 
    did -a $dname 11 $calc($did($dname,11).text + 1)
    Phonebook $did($dname,11).text $did($dname,1).text
  }  
}

Comments

Sign in to comment.
ChiefDean   -  Feb 10, 2010

:P well, that was wierd. this is an AWESOME script tho :P

 Respond  
napa182   -  Jan 30, 2010

lol @ leech boy

 Respond  
Pkxpkz   -  Jan 30, 2010

Rofl?

 Respond  
Jethro   -  Jan 30, 2010

No, Neptune's MSL hate equals love. Otherwise he'd never comment here in the first place.

 Respond  
^Neptune   -  Jan 29, 2010

IT IS RATHER SH!T YES.

 Respond  
sunslayer   -  Jan 29, 2010

MSL HATER

 Respond  
^Neptune   -  Jan 29, 2010

omg wtf

Why the HECK would I need this for mIRC? I think someone's getting bored. Try another language!

 Respond  
FordLawnmower   -  Jan 27, 2010

@Jethro_ This just searches the white pages from all phone books in the U.S.
All the numbers in the white pages are there because the people wanted their phone numbers listed so people can get in touch with them.
The Google PhoneBook is just yet another tool to find friends/family members that have moved away or just simply fell out of touch. Any tool or service can be used for malicious purposes.

 Respond  
Jethro   -  Jan 26, 2010

I already despise marketing phone calls to some extent, but to find a person's phone number and call him or her...I'm not sure about that. lol

 Respond  
FordLawnmower   -  Jan 26, 2010

:D

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.