<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Short Like A Fox &#187; ISBNdb.com</title>
	<atom:link href="http://shortlikeafox.com/tag/isbndbcom/feed/" rel="self" type="application/rss+xml" />
	<link>http://shortlikeafox.com</link>
	<description>They Say I'm Short...</description>
	<lastBuildDate>Wed, 29 Jul 2009 22:21:46 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.3</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>How to Intergrate ISBN Access on Your Webpages Using PHP</title>
		<link>http://shortlikeafox.com/2008/08/12/how-to-intergrate-isbn-access-on-your-webpages-using-php/</link>
		<comments>http://shortlikeafox.com/2008/08/12/how-to-intergrate-isbn-access-on-your-webpages-using-php/#comments</comments>
		<pubDate>Wed, 13 Aug 2008 05:13:23 +0000</pubDate>
		<dc:creator>ShortLikeAFox</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[ISBN]]></category>
		<category><![CDATA[ISBNdb.com]]></category>

		<guid isPermaLink="false">http://shortlikeafox.com/?p=67</guid>
		<description><![CDATA[ ISBNs or International Standard Book Numbers are useful identifiers that can be used to find information about individual books. If you want to integrate ISBN lookups in your web applications PHP makes it doable. 
Step One:  ISBNdb.com is a has created an API that allows users from around the web to access their [...]]]></description>
			<content:encoded><![CDATA[<!-- This is a HTML comment, it will not display in any page. Feel free to remove this comment if it cause any inconvenient to you.
	Thanks for using digg digg, please visit http://www.mkyong.com/blog/digg-digg-wordpress-plugin for any comments and ideas, 
	
    Author : Yong Mook Kim
    Website : http://www.mkyong.com
	--><div style='float:right'><table> <td><iframe src='http://digg.com/api/diggthis.php?w=new&amp;u=http://shortlikeafox.com/2008/08/12/how-to-intergrate-isbn-access-on-your-webpages-using-php/&amp;t=How+to+Intergrate+ISBN+Access+on+Your+Webpages+Using+PHP+&amp;s=normal' height='80' width='52' frameborder='0' scrolling='no'></iframe></td></table></div><p>ISBNs or International Standard Book Numbers are useful identifiers that can be used to find information about individual books. If you want to integrate ISBN lookups in your web applications PHP makes it doable. </p>
<p><strong>Step One:  </strong><a href="https://isbndb.com/" target="_blank">ISBNdb.com</a> is a has created an API that allows users from around the web to access their database of ISBN records. Here is their own description of the API: </p>
<blockquote>
<p><em> ISBNdb.com&#8217;s remote access application programming interface (API) is  designed to allow other websites and standalone applications use the  vast collection of data collected by ISBNdb.com since 2003. As of this  writing, in July 2005, the data includes nearly 1,800,000 books; almost  3,000,000 million library records; close to a million subjects; hundreds  of thousands of author and publisher records parsed out of library  data; more than 10,000,000 records of actual and historic prices. </em></p>
</blockquote>
<p>To use this API you must first <a href="https://isbndb.com/account/create.html?return=https://isbndb.com/account/index.html" target="_blank">register. </a>Registration takes literally seconds to complete. After this, you need to set up a key. Keys allow you to directly access the ISBN database from your own code. The ISBNdb.com website makes setting up keys easy. </p>
<p><strong>Step Two: </strong>Now you&#8217;re start writing code to interact with the database. A request for an ISBN lookup will look something like this: </p>
<blockquote>
<p> $isbnData = <span class="style1">&quot;http://isbndb.com/api/books.xml?access_key=XXXXXX&amp;index1=isbn&amp;value1=$isbnQuery&quot;</span>;</p>
</blockquote>
<p>You would insert your access key in the place of XXXXXX.  <em>$isbnQuery </em>would be the isbn number you are interested in. <em>$isbnData</em> is an XML file. To access this data you need to let your code know what it is dealing with. Something like this will work:</p>
<blockquote>
<p> $xmlData = @simplexml_load_file($isbnData) <span class="style3">or die </span>(<span class="style1">&quot;no file loaded&quot;</span>) ;</p>
</blockquote>
<p>Now you can access individual variables with calls similar to this:</p>
<blockquote>
<p> $title = 		$xmData-&gt;BookList[<span class="style1">0</span>]-&gt;BookData[<span class="style1">0</span>]-&gt;Title ;
  </p>
</blockquote>
<p>Here is a complete working example:</p>
<blockquote>
<p class="style1">&lt;?php</p>
<p>$searchQuery = <span class="style1">&quot;9780684801223&quot;</span>; <span class="style9">//The ISBN for Ernest Hemingway&#8217;s Old Man and the Sea </span><br />
    $isbnData =<span class="style1"> &quot;http://isbndb.com/api/books.xml?access_key=XXXXXX&amp;index1=isbn&amp;value1=$searchQuery&quot;</span>; <span class="style9">//Remember to replace XXXXXX with your own access key</span> <br />
    $xmlData = @simplexml_load_file($isbnData) <span class="style3">or die</span> (<span class="style1">&quot;no file loaded&quot;</span>) ;<br />
    $title = 		$xmlData-&gt;BookList[<span class="style1">0</span>]-&gt;BookData[<span class="style1">0</span>]-&gt;Title ;<br />
    $authors =		$xmlData-&gt;BookList[<span class="style1">0</span>]-&gt;BookData[<span class="style1">0</span>]-&gt;AuthorsText ;<br />
  $publisher =	$xmlData-&gt;BookList[<span class="style1">0</span>]-&gt;BookData[<span class="style1">0</span>]-&gt;PublisherText ;</p>
<p><span class="style3">echo</span>(<span class="style1">&quot;$title&lt;br/&gt;&quot;</span>);<br />
    <span class="style3">echo</span>(<span class="style1">&quot;$authors&lt;br/&gt;&quot;</span>);<br />
    <span class="style3">echo</span>(<span class="style1">&quot;$publisher&lt;br/&gt;&quot;</span>);</p>
<p class="style9">//This example prints:<br />
  //The old man and the sea<br />
    //Ernest Hemingway<br />
  //New York : Scribner Paperback Fiction, 1995.</p>
<p class="style1">?&gt;</p>
</blockquote>
<p></p>
]]></content:encoded>
			<wfw:commentRss>http://shortlikeafox.com/2008/08/12/how-to-intergrate-isbn-access-on-your-webpages-using-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
