Google Blogoscoped

Saturday, May 28, 2005

Web Services

Thanks to Gary Price for pointing me to this list of public Web Services.

On a related note, this is how you can access the Google API using PHP5:

$client = new SoapClient( 'http://api.google.com/GoogleSearch.wsdl', array("trace"=>1,"exceptions"=>0) );

$result = $client->doGoogleSearch(
        'YOUR-API-KEY', // Your Google API key
        'something',    // Search query with up to 32 words
        20,             // Start
        5,              // Maximum results from 1 to 10
        FALSE,          // Filter removes similar results
        '',             // Restrict by topic
        false,          // Safesearch
        '',             // Language restriction
        '','');

foreach($result->resultElements as $hit) {
    echo $hit->URL . '<br />';
}

Advertisement

 
Blog  |  Forum     more >> Archive | Feed | Google's blogs | About
Advertisement

 

This site unofficially covers Google™ and more with some rights reserved. Join our forum!