getProxy(); // Perform the query with some default settings $queryResponse = $googleProxy->doGoogleSearch($key, $term, 0, 10, true, '', false, '', '', ''); // Check if there was an error, and simply fail with an error if so if (is_a($queryResponse, 'SOAP_fault')) die('SOAP error: ' . $queryResponse->message); // Also make sure we actually got some results if ($queryResponse->estimatedTotalResultsCount == 0) die('No results were returned.'); // Tell the user-agent (web browser?) that this is an RSS (XML) file header('Content-Type: application/rss+xml; charset=UTF-8'); ?> <![CDATA[Google Search: <?=$term?>]]> ]]> '.]]> en resultElements as $result) { ?> <![CDATA[<?=($result->title ? preg_replace('/<\/?b>/', '', $result->title) : $result->URL)?>]]> URL?>]]> snippet?>]]>