AutomationIsKey
Regular Member
- Jan 25, 2016
- 373
- 324
Simply throw this into a PHP file and load it onto your server and watch it work (it will store all of their profiles into a txt file automatically)
changing only a few things about the above code, I made it automatically comment on every single one of the links it collected telling the users to check out xxx website, (which was an email collection form) I've gathered about 30,000 emails so far with around 700K parsed.
PHP:
<?php
$url = 'https://twitter.com/search?f=tweets&vertical=default&q=sarahah.com&src=typd';
$refresh=10;
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, false);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);
$response = curl_exec($curl);
curl_close($curl);
preg_match_all('#\bhttps?://[^,\s()<>]+(?:\([\w\d]+\)|([^,[:punct:]\s]|/))#', $response, $match);
$check = [];
$existing = file('collected.txt', FILE_IGNORE_NEW_LINES);
$usernames = [];
$file = fopen('collected.txt', 'a');
foreach( array_unique( $match[0] ) AS $url )
{
if( strpos( $url, '.sarahah.com' ) !== false )
{
$pieces = explode('.', str_replace(['http://','https://'],'',$url));
if( $pieces[0] != 'www' && !in_array($pieces[0],$existing) ) $usernames[] = $pieces[0];
}
}
foreach( array_unique( $usernames ) AS $username )
{
fwrite($file, $username."\n");
}
fclose($file);
print 'done';
print '<meta http-equiv="refresh" content="'.$refresh.'">';
changing only a few things about the above code, I made it automatically comment on every single one of the links it collected telling the users to check out xxx website, (which was an email collection form) I've gathered about 30,000 emails so far with around 700K parsed.