Example

Example – Basic examples of Services_Google

Basic examples of Services_Google

The following examples show how to use some basic features of Services_Google:

Search Google for PEAR

<?php
require_once 'Services/Google.php';
    
$google = new Services_Google($key);

$google->queryOptions['limit'] = 30;
$google->search("PEAR");

foreach (
$google as $key => $result) {
  echo 
"$key]\t$result->title\n";
}
?>

Spell Checking

<?php
require_once 'Services/Google.php';
    
$google = new Services_Google($key);

echo 
$google->spellingSuggestion("wahll")."\n";
?>
Introduction to Services_Google (Previous) Services_Libravatar (Next)
Last updated: Sat, 16 Feb 2019 — Download Documentation
Do you think that something on this page is wrong? Please file a bug report.
View this page in:
  • English

User Notes:

There are no user contributed notes for this page.