Script to compile direct mail list (not email) from online white pages.

Status
Not open for further replies.

bmcgonag

Beta member
Messages
2
Location
Lubbock, TX
I would like a script to compile a direct mail list (not email) from the online whitepages. Only for my city.

I'm sure it can be done, and I'm familiar with perl, some php, and not much else.

The deal is, if I goto white pages online, I can put in only a last name, like smith, but then it returns 300+ people, and it only lets me see 10 at a time.

I need a way to pull that 10 person data, then move to the next page.

This isn't for me to sell, and it isn't for me to spam. I want to send a single round of flyers about a charity event i'm working on. That's it.

I know there are services, but they want thousands of dollars for this type of list.

Thanks for any help.
 
php should be able to load pages into memory. then you can parse the html code.

here's some things to play with

PHP:
//retrieve HTML code for a given address
function getPageSource($address) {
  $page = fopen($address,"r");
  $source = stream_get_contents($page);
  fclose($page);
  return $source;
}

//
function getImgLine($html, $find, $break) {
  $lines = explode($break, $html);
  foreach($lines as $data) {
    if(substr_count($data, $find)) {
      return $data;
      echo str_replace(">","",$data)."<br>";
    }
  }
}
 
php should be able to load pages into memory. then you can parse the html code.

here's some things to play with

PHP:
//retrieve HTML code for a given address
function getPageSource($address) {
  $page = fopen($address,"r");
  $source = stream_get_contents($page);
  fclose($page);
  return $source;
}

//
function getImgLine($html, $find, $break) {
  $lines = explode($break, $html);
  foreach($lines as $data) {
    if(substr_count($data, $find)) {
      return $data;
      echo str_replace(">","",$data)."<br>";
    }
  }
}

Note that this will only work if fopen() is allowed to access external files in the php.ini.
 
Status
Not open for further replies.
Back
Top Bottom