• View our reviews on Hot Scripts
  • JS Tutorial

Recent Comments

Powered by Disqus

Back to articles

Get book title based on ISBN

Here is a function to get book title and author based on book's ISBN number. To use this function you will have to register here: to get your API key.

After that you can use this function to ge xml data about the book:

//fucntion to get book title and author based on ISBN number
function check_isbn($isbn)
    //your API key
    $key = "12345678";
    //url to connect to
    $url = "".

    // send request 
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, $url);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
    $curlData = curl_exec($curl);
    //returning retrieved xml
    return $curlData;


//making page to behave like xml document to show xml
header('Content-Type:text/xml; charset=UTF-8');
//calling function
$isbn_number = "0764549421";
$xml = check_isbn($isbn_number);
echo $xml;

You may also be interested in:

Powered by

blog comments powered by Disqus