>>517

$subject = file_get_contents("http://www.yahoo.com/"); // >>516
$pattern = '/<h[12].*?>(.*?)<\/h[12]>/is';
preg_match_all($pattern, $subject, $matches); // http://jp.php.net/manual/ja/function.preg-match-all.php

var_dump($matches);