Handle .mobi files with ease.
This package was born out of frustration. There didn't seem to be a decent open source .mobi reader out there for PHP, so I wanted to create my own to give back to the community.
composer require choccybiccy/mobi
use Choccybiccy;
$mobi = new Mobi\Reader('sherlock.mobi');
echo $mobi->getTitle(); # The Adventures of Sherlock Holmes by Doyle
echo $mobi->getAuthor(); # Doyle, Arthur Conan, Sir, 1859-1930
use Choccybiccy;
$mobi = new Mobi\Reader('sherlock.mobi');
$palmDb = $mobi->getPalmDbHeader();
$palmDoc = $mobi->getPalmDocHeader();
$mobi = $mobi->getMobiHeader();
$exth = $mobi->getExthHeader();
echo $exth->getRecordByType(Mobi\Header\ExthHeader::TYPE_AUTHOR); # Doyle, Arthur Conan, Sir, 1859-1930
echo $exth->getRecordByType(Mobi\Header\ExthHeader::TYPE_PUBLISHER); # Mobipocket (an Amazon.com company)
./vendor/bin/phpunit
- Parse .mobi files
- More tests
- EXTH record type constants
- Helper methods to get common attributes (title, author etc)