例 – Services_Google の基本的な使用法

Services_Google の基本的な使用法

Services_Google の基本機能の使用例を以下に示します。

Google で 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";
}
?>

スペルチェック

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

echo 
$google->spellingSuggestion("wahll")."\n";
?>
Services_Google について (Previous) Services_Libravatar (Next)
Last updated: Wed, 22 Oct 2014 — Download Documentation
Do you think that something on this page is wrong? Please file a bug report or add a note.
View this page in:

User Notes:

There are no user contributed notes for this page.