Google API PHP Client -


Apache
跨平台
PHP

软件简介

Google API PHP Client 库能让你在 Google+、Drive、或者你服务器上的 YouTube 上使用 Google API。

示例代码:

<?php  
require_once 'google-api-php-client/src/Google/autoload.php'; // or wherever autoload.php is located
$client = new Google_Client();  
$client->setApplicationName("Client_Library_Examples");  
$client->setDeveloperKey("YOUR_APP_KEY");  
$service = new Google_Service_Books($client);  
$optParams = array('filter' => 'free-ebooks');  
$results = $service->volumes->listVolumes('Henry David Thoreau', $optParams);  
foreach ($results as $item) {    
echo $item['volumeInfo']['title'], "<br /> \n";  
}