Skip to content

0AwsD0/Offline-Manga-Reader-for-www-servers-like-XAMPP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Offline Manga reader - for www servers like XAMMP

Because I have a strange habit of saving everything I like offline...

I made it for myself since I just wanted to read certain manga even if my internet is gone, or manga is deleted from internet for strange reason. There are probably some other solutions out there, but I wanted something tailored for myself, and here we are. Since the images are strangely cut, I couldn't simply use the default image app on Windows or any other I had on my PC. If you like to use it offline on your PC go on and download it. It's simple, easy and MADE FOR LOCAL USE. You can use it and modify it for your private needs. If you make changes to the code and you want to share it, make a fork of this project. You have to include link to original repository on the top as shown here: Original repository: [link]

Remember if you like something and it's online resource, save it!

How to use

Put php files and css file (excluding 'readme.md', '.gitattributes' and 'OLD VERSION' directory) together or combine them into one file and drop them into directory with episodes. !!READ 'Possible problems.' BELOW!! (you can put .php file as function instead of calling it I just made it outside to prevent page reload) Just put the files inside 'manga name here' folder containing Episodes. Of course the folder should be placed into htdocs - for example: 'xampp\htdocs\your manga here' or other folder designed for http server. And http server should be online. Open browser type 'http://localhost/' or just 'localhost' into your search bar and navigate into your manga folder or enter it manually. For example, 'localhost/MANGA/Manga name here/'. If you set up custom port you need to include it. For example: 'localhost:88'.

REMEMBER NOT TO PUT: '.gitattributes', 'README.md' AND 'OLD VERSION' directory INTO YOUR MANGA FOLDER!

Proper 'tree' example (where to put the files):

│   images.php
│   index.php
│   style.css
│
├───Chapter 1
│       01.jpg
│       02.jpg
│       03.jpg
│
├───Chapter 2
│       01.jpg
│       02.jpg
│       03.jpg
│
├───Chapter 2.1
│       01.jpg
│       02.jpg
│       03.jpg
│
├───Chapter X
│       01.jpg
│       02.jpg
│       03.jpg

Possible problems.

I wrote it for PC use, so it's not optimized towards mobile devices. (style.css)

If you combine those 3 files (images.php | index.php | style.css) into one file remove -3 from below code and type -1 instead.

if($i <= ($filecount-3)){
    // ---> index.php line 24

If the file format for your 'images' is not supported ~ like '.gif', you can just simply add it in here:

  • images.php
before:
$images = preg_grep('~\.(jpeg|jpg|png|webp)$~', scandir($directory));
after:
$images = preg_grep('~\.(jpeg|jpg|png|webp|gif)$~', scandir($directory));

Have fun reading your manga offline! ///And yes I know running http server just to do so is overkill but I wanted to have it my way + for me it was the fastest way to get what I want.

  • The 'OLD VERSION' folder is made to offer legacy solution if this one does not work for oyu by some reason. Remember to read README of that version, since there are some crucial information inside.