Свернутый текст
<?
$ch = curl_init ();
curl_setopt ($ch , CURLOPT_URL , "http://orel-region.ru/index.php?head=6&part=73&unit=33&op=8&in=1& ;quo t;);
curl_setopt ($ch , CURLOPT_USERAGENT , "Mozilla/5.0");
curl_setopt ($ch , CURLOPT_RETURNTRANSFER , 1 );
$content = curl_exec($ch);
curl_close($ch);
//preg_match_all("/<p>(.*)<br>\r\n<a href=\"(.*)\">.*<\/a><\/p>/isU",
//preg_match_all("/<h1>(.*)<\/span><\/div><\/div>/isU",
preg_match_all("/<\/a><\/p>\<h1>(.*)<\/span><\/div><\/div>/isU",
$content, $matches, PREG_PATTERN_ORDER);
for ($i = 0; $i < count($matches[1]); $i++)
{
echo "<h1>".$matches[1][$i]."</h1>";
flush();
$ch = curl_init ();
curl_setopt ($ch , CURLOPT_URL , $matches[2][$i]);
curl_setopt ($ch , CURLOPT_USERAGENT , "Mozilla/5.0");
curl_setopt ($ch , CURLOPT_RETURNTRANSFER , 1 );
$content = curl_exec($ch);
curl_close($ch);
}
?>
Просьба сильно не пинать, ибо тока начинаю)