이것은 매우 기본적인 것입니다. 그렇지만 저는 PHP를 사용하지 않았기 때문에 열심히 찾았습니다. 제가 사용하는 코드는 오류를 일으키고 있으며, 제가 할 수있는 것이 확실하지 않습니다. 해결에PHP 코드에서 오류가 발생했습니다
<?php
$query = 'dogs';
$searches = 100; // number of results
$start = 0;
$pos = 1;
while($start < $searches)
{
$data = getPage('http://www.google.com/search?start=' . $start . '&q=' . urlencode($query));
preg_match_all("/\<li class\=g\>\<h3 class\=\"r\"\>\<a href\=\"([^\<\>]*)\" class\=l\>/",$data,$matches);
for($x = 0; $x < count($matches[1]); $x++)
{
echo '<p>' . $pos . ' ' . ($matches[1][$x]) . '</p>';
$pos++;
}
$start += 10;
}
?>
오류 :
어떤 도움 라인 (11)에 정의되지 않은 함수 getPage()에 전화?
어디서나'getPage()'가 정의되어 있습니까? 포함시키지 않은 것을 다른 파일에 있습니까? – PureForm