PHP Comic Reader Tools: Display images from comic books in HTML pages

Recommend this page to a friend!
  Info   View files Example   Screenshots Screenshots   View files View files (12)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2020-05-31 (9 months ago) RSS 2.0 feedNot yet rated by the usersTotal: 69 All time: 9,772 This week: 306Up
Version License PHP version Categories
comicbooktools 1.0.0Custom (specified...7HTML, Graphics, PHP 7
Description Author

This package can display images from comic books in HTML pages.

It can read comic book files in cbz or cbr format and extract comic images from them.

The package can also display the extracted comic images as a slideshow in an Web page.

Innovation Award
PHP Programming Innovation award nominee
May 2020
Number 5
Many people like to read comic books. In the past they used to be available only in paper.

Nowadays, many comic books are available as computer file archives that contain digitized versions of the comic book images.

This package provides a solution to access and display files with comic book images.

Manuel Lemos
Picture of Karl Holz
  Performance   Level  
Name: Karl Holz <contact>
Classes: 14 packages by
Country: Canada Canada
Innovation award
Innovation award
Nominee: 9x

Details

Package: ComicBookTools Author: Abu Khadeejah Karl Holz <binholz|a|hotmail|d|com> Licence: LICENCE

About Me

I'm Abu Khadeejah Karl Holz, I'm a StageHand by trade and coding is my hobby. I have diploma for Computer Systems Technologies from Seneca College in Toronto, this is where I learned the basics of UNIX, Linux, Shell Scripting, Perl, PHP, Windows, etc. I'm a father, so i have been busy taking care of my girl and not spending a lot of time coding php on my off time.

Comic Book Tools

this is a quick little tool to let you view your cbr files off of a webserver using PHP, like the built-in server. This project uses the rar pecl extention and it will need to be built by the user. Not all file versons are read by the pecl plugin, I have added a setup.php file that will create an ini file with all your cbz/cbr files, this is used for the front page page so you can select your comic from what was found. i have tried added conversion to png support, not all images seem to be viewable so far. the links that are generated are base64 encoded as a query string. you will need to increase the php memory usage for this class in your php.ini

File type viewing status

My class will deal with both rar and zip based comic books, class will test for rar first, then zip for all requests. 7-zip (cb7) is not supported, i didn't see a pecl extention or anything in the documentation about 7-zip. You can create a zip file arcive of selected images, like in MacOS Finder, then rename the extention to cbz.

<zipfile>.[zip|rar|cbr|cbz]
|_ File01.png
|_ File02.jpg
|_ File03.png

As you can see from above, this class can be used for more than just comics, take a look at the samples i made in the comic folder (check my github)

You Need the RAR PECL EXTENTION for cbr files

you will need this pecl extention installed on your system. i built it from source using the link bellow:

$ cd <src dir>
$ ./configure
$ make
$ make test
$ make install

I used the system version of PHP 7 in MacOS High Sieara and not MAMP (failed to build for me).

php.ini

Enable pecl extention in the /etc/php.ini

extension=rar.so

you should add the code bellow to your php.ini file, if my scripts setting doesn't work. Most images in cbr/cbz files are high resolution.

memory_limit = 2048M

use PHP built-in webserver

for this project, i'm just using the built in webserver for PHP since this is just a personal reader for comics that you can setup on a raspberry pi, pine64 or other SBC. take a look at the index.php and edit the $dir variable for your comic book directory.

$ cd <comic srv>
$ php -S localhost:8888 index.php
or
$ php -S <ip address|hostname>:8888 index.php

Support My Work

If you like any of the work I have done in the past, I'm welcome to any support you would like to provide via PayPal or EMT. I would like to focus on the projects with the most downloads, like the Excel2JSON, eKitab (code clean-up?), WebMap (upgrade) or others listed on PHP Classes website. My current computer is an MacMini 2010. I would like to get a new laptop (Mac perferablly). E-mail or make an issue on GitHub if you would like to ask questions or provide help. I like to keep things open source so we can have these tools availale and educational.

Screenshots  
  • index_page
  • commandline
  • comic_view
  Files folder image Files  
File Role Description
Files folder image.idea (6 files)
Accessible without login Plain text file comic.ini Data Auxiliary data
Plain text file ComicBookTools.class.php Class Class source
Accessible without login Plain text file index.php Example Example script
Accessible without login Plain text file LICENCE Lic. License text
Accessible without login Plain text file README.MD Doc. Documentation
Accessible without login Plain text file setup.php Example Example script

  Files folder image Files  /  .idea  
File Role Description
  Accessible without login Plain text file comic_reader.iml Data Auxiliary data
  Accessible without login Plain text file misc.xml Data Auxiliary data
  Accessible without login Plain text file modules.xml Data Auxiliary data
  Accessible without login Plain text file php.xml Data Auxiliary data
  Accessible without login Plain text file vcs.xml Data Auxiliary data
  Accessible without login Plain text file workspace.xml Data Auxiliary data

 Version Control Unique User Downloads Download Rankings  
 80%
Total:69
This week:0
All time:9,772
This week:306Up

For more information send a message to info at phpclasses dot org.