31) { die("Search string too long."); }
// lets not be too cruel, stop them at 100 results
if($amount > 100) { $amount = 100; }
// create our search URL, first the server in http://
$url = 'http://www.google.com/';
// now start the query with the amount
$url .= 'search?num='.$amount.'&';
// now lets add the search string (url-encoded)
$url .= 'q=%22'.urlencode($string).'%22&';
// and finally google's identifier
$url .= 'btnG=Search';
// echo it for testing
echo $url."
";
// use our get_url function to grab the content
$content = $this->get_url($url);
/* make sure we reformat it (14/05), trademark liabilities */
// and now lets echo the content we just scraped
return $content;
}
function parse_results($results) {
$opener = "