Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8401113
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T21:43:21+00:00 2026-06-09T21:43:21+00:00

Is there any freely available library for PHP which parses a .mobi file to

  • 0

Is there any freely available library for PHP which parses a .mobi file to get the:

  • Author
  • Title
  • Publisher
  • Cover

Edit:

To everyone who thinks this is an exact duplicate of Does a PHP Library Exist to Work with PRC/MOBI Files, you’re obviously too lazy to read the questions.

That asker wants to know how to generate .mobi files using a PHP library. I want to know how to break apart, or parse, already created .mobi files to get certain information. Therefore, the solution to that question, phpMobi will not work because it is a script to generate .mobi files from HTML, not to parse .mobi files.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T21:43:23+00:00Added an answer on June 9, 2026 at 9:43 pm

    A very very very lame example, but if you get desperate, you may try something like this:

    $data = file_get_contents("A Young Girl's Diary - Freud, Sigmund.mobi");
    
    $chunk = mb_substr($data, mb_strpos($data, 'EXTH'), 512);
    $chunks = explode("\x00", $chunk);
    array_shift($chunks);
    
    $chunks = array_filter($chunks, function($str){return preg_match('#([A-Z])#', $str) && mb_strlen($str) > 2;});
    
    $chunks = array_combine(array('author', 'publisher', 'title'), $chunks);
    
    print_r($chunks);
    

    Output:

    Array
    (
        [author] => Freud, Sigmund
        [publisher] => Webarto
        [title] => A Young Girl's Diary
    )
    

    File used: http://freekindlebooks.org/Freud/752-h.mobi (edited Publisher metadata with Calibre)

    File parsing is not even remotely easy or fun thing to do. Just take a look at this: http://code.google.com/p/xee/source/browse/XeePhotoshopLoader.m?r=a70d7396356997114b548f4ab2cbd49badd7d285#107

    What you should be doing is reading byte by byte, but because there is no detailed documentation, I’m afraid that won’t be an easy job.

    P.S. I haven’t tried to fetch cover photo.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have developed my website in VS2010. is there any tool freely available which
Is there a freely available library to create a MPEG (or any other simple
Is there any freely available library (other than java media framework) that I can
Is there any repository or list of freely available SKOS (or even not SKOS)
I want to parse SQL code using C#. Specifically, is there any freely available
Is there any Tree-Grid component that is freely available for a C# project? A
Is there any Diagramming component that is freely available for a C# project? If
I am trying to find a reasonably mature/stable and freely available (preferably open-source) library
Can I freely assign something to non-existent or not-known-existent members in php? Is there
Recently I tried the book Building Expert Systems in Prolog which is freely available

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.