You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
1.3 KiB

  1. Google APIs Client Library for PHP
  2. =====================================
  3. == Description
  4. The Google API Client Library enables you to work with Google APIs such as Google+, Drive, Tasks, or Latitude on your server.
  5. Requirements:
  6. PHP 5.2.x or higher [http://www.php.net/]
  7. PHP Curl extension [http://www.php.net/manual/en/intro.curl.php]
  8. PHP JSON extension [http://php.net/manual/en/book.json.php]
  9. Project page:
  10. http://code.google.com/p/google-api-php-client
  11. OAuth 2 instructions:
  12. http://code.google.com/p/google-api-php-client/wiki/OAuth2
  13. Report a defect or feature request here:
  14. http://code.google.com/p/google-api-php-client/issues/entry
  15. Subscribe to project updates in your feed reader:
  16. http://code.google.com/feeds/p/google-api-php-client/updates/basic
  17. Supported sample applications:
  18. http://code.google.com/p/google-api-php-client/wiki/Samples
  19. == Basic Example
  20. <?php
  21. require_once 'path/to/src/Google_Client.php';
  22. require_once 'path/to/src/contrib/apiBooksService.php';
  23. $client = new Google_Client();
  24. $service = new Google_BooksService($client);
  25. $optParams = array('filter' => 'free-ebooks');
  26. $results = $service->volumes->listVolumes('Henry David Thoreau', $optParams);
  27. foreach ($results['items'] as $item) {
  28. print($item['volumeInfo']['title'] . '<br>');
  29. }