How to put a book in a Web page

Google offers a new service to webmasters: just as you can put videos in your pages, it is now proposed to integrate books with a block of JavaScript code to add ...
Thus the web page replaces the ebook and it becomes possible to read anywhere with a netbook and an Internet connection.

Demonstration

Explanation

The code is always the same, it works like Youtube, the code of the video is replaced by the code of the book and has to be passed as a parameter:

<script type="text/javascript" src="http://books.google.com/books/previewlib.js"> 
</script> 
<script type="text/javascript">GBS_insertEmbeddedViewer('8U2oAAAAQBAJ',500,500);
</script>

To find the code of a book, you have to go to Google Books Search, search for a document, select Full view in Advanced search, and once it is found, get the code in the URL that is displayed, it is between id= and &.

For example, search for A Tale of Two Cities, Google Books returns this URL:

http://books.google.com/books?id=TKiKIGQfcioC&printsec=frontcover
&dq=dickens&lr=lang_en&as_brr=0&hl=fr&sig=ACfU3U0IUN1zt8vZrRBI0TKdyZzCAz8v6Q#PPA199,M1

The code isTKiKIGQfcioC, assign it to GBS_insertEmbeddedViewver. The two other parameters are the width and the height.

More information

See also