PHP Classes

File: cgooglebooksAPi/tests/simpleFetch.php

Recommend this page to a friend!
  Classes of Mohammed Asad   PHP Google Books API   cgooglebooksAPi/tests/simpleFetch.php   Download  
File: cgooglebooksAPi/tests/simpleFetch.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP Google Books API
Search for books using Google Books API
Author: By
Last change:
Date: 7 years ago
Size: 698 bytes
 

Contents

Class file image Download
<?php
   
/**
    * A simple example to use the class
    * Currently, I fetch title, authors,publisher, description, categories, isbn, thumbnail_url
    * If you need more data you are free to add and use it,
    *
    * More parameter details can be found here. //https://developers.google.com/books/docs/v1/reference/volumes
    *
    */
require '../src/cgoogleBooksApi.class.php';

$objgoogleBooksApi = new cgoogleBooksApi();
$objgoogleBooksApi->setSearchData(array('title'=>'Inferno','categories'=>'Comics','start_index'=>0,'max_result'=>'2'));
$objgoogleBooksApi->setUsePHPCurl(true);
$arrmixStrBooksData = json_decode( $objgoogleBooksApi->fetchGoogleBooks(), true );

print_r( $arrmixStrBooksData );

?>