PHPackages                             choccybiccy/mobi - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. choccybiccy/mobi

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

choccybiccy/mobi
================

Parse .mobi files.

0.1.2(9y ago)5217[4 issues](https://github.com/choccybiccy/mobi/issues)1MITPHPPHP &gt;=5.4

Since Sep 19Pushed 7y ago1 watchersCompare

[ Source](https://github.com/choccybiccy/mobi)[ Packagist](https://packagist.org/packages/choccybiccy/mobi)[ RSS](/packages/choccybiccy-mobi/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (3)Dependencies (1)Versions (4)Used By (1)

.mobi
=====

[](#mobi)

Handle .mobi files with ease.

Introduction
------------

[](#introduction)

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.

Installation
------------

[](#installation)

```
composer require choccybiccy/mobi

```

Usage
-----

[](#usage)

### Reading .mobi files

[](#reading-mobi-files)

```
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

```

#### .mobi headers

[](#mobi-headers)

```
use Choccybiccy;

$mobi = new Mobi\Reader('sherlock.mobi');

$palmDb = $mobi->getPalmDbHeader();
$palmDoc = $mobi->getPalmDocHeader();
$mobi = $mobi->getMobiHeader();
$exth = $mobi->getExthHeader();

```

#### EXTH records

[](#exth-records)

```
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)

```

Testing
-------

[](#testing)

```
./vendor/bin/phpunit

```

Todo
----

[](#todo)

- Parse .mobi files
- More tests
- EXTH record type constants
- Helper methods to get common attributes (title, author etc)

Thanks
------

[](#thanks)

-

###  Health Score

22

—

LowBetter than 21% of packages

Maintenance4

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

3

Last Release

3571d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/b36011a36520abc06a7bcec01478a3e4c66cdafd8c8e6ecec44bade9e25d11ef?d=identicon)[martinph](/maintainers/martinph)

---

Top Contributors

[![martinph](https://avatars.githubusercontent.com/u/178519?v=4)](https://github.com/martinph "martinph (6 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/choccybiccy-mobi/health.svg)

```
[![Health](https://phpackages.com/badges/choccybiccy-mobi/health.svg)](https://phpackages.com/packages/choccybiccy-mobi)
```

###  Alternatives

[mck89/peast

Peast is PHP library that generates AST for JavaScript code

19037.7M41](/packages/mck89-peast)[sauladam/shipment-tracker

Parses tracking information for several carriers, like UPS, USPS, DHL and GLS by simply scraping the data. No need for any kind of API access.

9642.0k](/packages/sauladam-shipment-tracker)[jstewmc/rtf

Read and write Rich Text Format (RTF) documents with PHP

46143.1k6](/packages/jstewmc-rtf)[moonshine/layouts-field

Field for repeating groups of fields for MoonShine

107.9k](/packages/moonshine-layouts-field)[tcds-io/php-jackson

A lightweight, flexible object serializer for PHP, inspired by FasterXML/jackson

112.9k10](/packages/tcds-io-php-jackson)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
