Script to compile direct mail list (not email) from online white pages. - Techist - Tech Forum

Go Back   Techist - Tech Forum > Computer Software > Programming
Click Here to Login
Closed Thread
 
Thread Tools Display Modes
 
Old 03-22-2009, 09:49 PM   #1 (permalink)
Newb Techie
 
Join Date: Mar 2009
Location: Lubbock, TX
Posts: 2
Default Script to compile direct mail list (not email) from online white pages.

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.
__________________

__________________
bmcgonag is offline  
Old 03-23-2009, 10:42 AM   #2 (permalink)
It's all just 1s and 0s
 
office politics's Avatar
 
Join Date: Jan 2004
Location: in the lab
Posts: 6,555
Send a message via MSN to office politics
Default Re: Script to compile direct mail list (not email) from online white pages.

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

here's some things to play with

PHP Code:
//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>";
    }
  }

__________________

office politics is offline  
Old 03-23-2009, 04:29 PM   #3 (permalink)
Newb Techie
 
Join Date: Mar 2009
Location: Lubbock, TX
Posts: 2
Default Re: Script to compile direct mail list (not email) from online white pages.

Thanks,

I'll give it a whirl. I'll probably be back with more questions.
__________________
bmcgonag is offline  
Old 03-23-2009, 05:16 PM   #4 (permalink)
Wizard Techie
 
CrazeD's Avatar
 
Join Date: Feb 2006
Location: Maine
Posts: 3,736
Send a message via AIM to CrazeD Send a message via MSN to CrazeD
Default Re: Script to compile direct mail list (not email) from online white pages.

Quote:
Originally Posted by office politics View Post
php should be able to load pages into memory. then you can parse the html code.

here's some things to play with

PHP Code:
//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.
__________________

Intel Q9400 | Gigabyte EP45-UD3P | G.Skill 2x2GB DDR2 1000 | XFX HD5870

Need website help? PM me!
CrazeD is offline  
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
The 25 Most Common Mistakes in Email Security Osiris Viruses, Spyware and Malware 8 02-20-2009 02:42 PM
Yahoo! Mail announces unlimited email storage maroon1 Polls 4 05-30-2007 10:03 PM



Copyright 2002- Social Knowledge, LLC All Rights Reserved.

All times are GMT -5. The time now is 11:03 PM.


Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2018, vBulletin Solutions, Inc.