Короче странная фигня, парсит не все урлы )
$content=file_get_contents("http://www.google.com/search?q=music");
$pattern = "!r\>\<a\shref\=\"([a-z,:,/,.,0-9,_,+,-,A-Z,%,#,$,@,?,&]*)\"\sclass\=!";
preg_match_all($pattern,$content,$tmp);
$result = implode("\n", $tmp[1]);
echo $result;
