I wrote a script for parser soaps:
<? $handler=fopen('javabitz.txt','a+'); for($i=1;$i<3000;$i++){ //парсим от 1 до 3000 $filename = 'http://www.***.ru/scr.php?num='.$i; echo $i.". "; $str = file_get_contents($filename); preg_match_all('|href="mailto:([^"]*)"|is',$str,$out); if(empty($out[1][0])) echo "Нету мыла"; else{ echo " get ".$out[1][0]; fwrite($handler,$out[1][0]."\n"); } echo "\n"; } fclose($handler); ?>
How to make it so that we parse from the <body>
to </body>
in preg_match_all
.
Thank you in advance :)