<? set_time_limit(0); ob_implicit_flush(); ini_set ('max_execution_time', "0"); ignore_user_abort(true); error_reporting (E_ALL); echo "<hr>STEP1<hr><br>\n"; $text="http://bash.org.ru/browse/"; if(@$_GET['st']) $page_start=$_GET['st']; else $page_start=1; if(@$_GET['en']) $page_end=$_GET['en']; else $page_end=210; $a=fopen("1.txt","w+"); echo "STOP PAGE = $page_end"; for($page=$page_start;$page<=$page_end;$page++) { $html=file_get_contents($text.$page); fputs($a,$html); echo "<br>Curent page = $page\n"; } fclose($a); echo "<br><hr>STEP2<hr><br>\n"; $out=array(); $a=fopen("base.txt","a+"); $html=file_get_contents("1.txt"); preg_match_all('|<div>(.*)</div>|U', $html, $out); for($i=0;$i<count($out[1]);$i++) { fputs($a,$num."<hr><b>$i</b><br>".$out[1][$i]."\r\n"); } fclose($a); echo "Full Final<br><a heref='base.txt'>DOWNLOAD BASE</a>"; ?>