<?php
$page = file_get_contents('http://www.google.com/search?q=new+york+pizza');
preg_match_all(
'@<h4[^>]*class=r[^>]*>\s*<a\s*href="(.*)".*class=l.*title="(.*)".*>@siU',
$page,
$matches);
print_r($matches[1]); // urls
print_r($matches[2]); // titles
?>
|