
28.12.2008, 19:52
|
|
Постоянный
Регистрация: 24.12.2007
Сообщений: 574
Провел на форуме: 3186852
Репутация:
316
|
|
<?PHP
// Mail harvester by gisTy
set_time_limit(0);
$crountMax = 200;
$crount = 0;
$db = 0;
$massive[] = '';
$fh = fopen("mails.txt","a");
for($i = 1;;$i++)
{
$url = "http://otvet.mail.ru/question/".$i;
$packet = file_get_contents($url);
preg_match_all("/<span id=\"online.*?)\" class=/i", $packet, $result);
$mas = array_pop($result);
$temp = array_merge($massive, $mas);
$massive = $temp;
$crount++;
if($crount == $crountMax)
{
$result = array_unique($massive);
fwrite($fh, implode("\n",$result));
$db += count($result);
unset($massive);
$massive[] = '';
unset($result);
unset($temp);
unset($mas);
unset($crount);
}
$packet = '';
}
?>
|
|
|