1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Twitter E-mail Gatherer

Discussion in 'Social Networking Sites' started by dor@tehexploa, May 18, 2009.

  1. dor@tehexploa

    dor@tehexploa Registered Member

    Apr 25, 2009
    Likes Received:
    ... blah blah - click on reference link to see original thread in teh Lounge

    I posted this in lounge already, but I think it is more appropriate here**.

    This script is posted in the Jr. VIP section (I didn't know it was), and because of recent news (That was fast... hxxp://www.webpronews.com/topnews/2009/05/11/spammers-may-have-another-trick-in-twitter) I tried making my own.

    After a few rough tries/posts and thanks to the help of ukescuba we found a good solution for gathering emails via Twitter:

    //set # of pages to scrape - you can increase this...
    //I found there were a max of 15 when searching manually
    for($i=1; $i<15; $i++)
    //set url to scrape
    //if you can think of any other popular emails domains let us know!
    $url = file_get_contents("http://search.twitter.com/search?&page=".$i."&q=gmail.com+OR+hotmail.com+OR+yahoo.com+OR+aol.com&rpp=100");
    //clean content
    $content = strip_tags($url);
    // extract emails
    for($x=0; $x < count($emails,1)-1; $x++)
    	print $emails[0][$x] . ", ";
    // next line creates a space between pages
    print "\n";print "\n";
    $output = ob_get_clean();
    // write emails to a file
    file_put_contents( 'emails.txt', file_get_contents('emailst.txt') . $output );
    **If admins are bent on keeping it only in the Junior VIP section then feel free to remove this thread.