<?php############################################################# ## Парсим http://whoistory.com/2006/02/28/## ###########################################################set_time_limit(1500);$i = 0;do{ $data = date('Y/m/d', strtotime('-'.$i.' day')); $urlsArr[] = 'http://whoistory.com/' . $data .'/'; if($data=="2006/02/01") break; $i++;}while(true);//echo implode('<br>',$urlsArr);$handle = fopen('trash.txt', 'w+');$domainArr = array();foreach($urlsArr as $value){ $html = file_get_contents($value); preg_match_all('#.ru.html">(.*?\.ru)<\/a><br#',$html,$domainArrTmp); //$domainArr = array_merge($domainArr,$domainArrTmp[1]); fwrite($handle, implode(PHP_EOL,$domainArrTmp[1]).PHP_EOL);}//file_put_contents('trash.txt',implode('<br>',$domainArr));fclose($handle);?>