(PHP Extension) ISBNdb API v2 Get Book Details
Demonstrates how to send a GET request to the ISBNdb API v2 with Authorization header. For more information, see https://isbndb.com/apidocs/v2#examples
<?php
// The version number (9_5_0) should match version of the Chilkat extension used, omitting the micro-version number.
// For example, if using Chilkat v9.5.0.48, then include as shown here:
include("chilkat_9_5_0.php");
// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
$http = new CkHttp();
$http->SetRequestHeader('Authorization','YOUR_REST_KEY');
$jsonStr = $http->quickGetStr('https://api2.isbndb.com/book/9780134093413');
if ($http->get_LastMethodSuccess() == false) {
print $http->lastErrorText() . "\n";
exit;
}
print 'Response status code: ' . $http->get_LastStatus() . "\n";
print 'Response JSON:' . "\n";
print $jsonStr . "\n";
?>
|