Since the begining of this year the standart ISBN has now 13 numbers instead of 10 so, I did some functions for validating the ISBN-10 and EAN (works for ISBN-13) with PHP, maybe it’s useful for someone.
From Wikipedia (ISBN and EAN):
The International Standard Book Number, ISBN, is a unique commercial book identifier barcode. The ISBN system was created in the United Kingdom, in 1966, by the booksellers and stationers W.H. Smith; originally it was the 9-digit Standard Book Numbering (SBN) code and still was used in 1974; it was adopted as the international standard ISO 2108 in 1970. A similar, numeric identifier, the International Standard Serial Number (ISSN), identifies periodical publications such as magazines. Since January 1, 2007, ISBNs are of 13 digits, like in Bookland EAN-13.
A European Article Number (EAN) is a barcoding standard which is a superset of the original 12-digit Universal Product Code (UPC) system developed in North America. The EAN-13 barcode is defined by the standards organisation GS1. It is also called a Japanese Article Number (JAN) in Japan. UPC, EAN, and JAN numbers are collectively called Global Trade Item Numbers (GTIN), though they can be expressed in different kinds of barcodes.
You can get the source code here and do a live test at http://www.alixaxel.com/wordpress/wp-content/2007/07/ISBN.php if you want to test the ISBN for the “Bulletproof AJAX” book, for example:
- ISBN-13: 978-0-321-47266-3
- ISBN-10: 0-321-47266-7
Thanks for this, especially the ability to quickly check the validity of an ISBN online. I did similar code a while back. I think the PEAR Validate module includes ISBNs and EANs now, which may be of use to you.
thanks for this code,it quickly check validation of ISBN