I certainly can. I only wish it were more clever...
Very simple directory structure...everything self contained
Code:
total 14
drws--Srwt+ 1 wwiii wwiii 0 May 3 20:15 .
drws--Srwt+ 1 wwiii wwiii 0 May 3 20:53 ..
-rw-r--r--+ 1 wwiii wwiii 212 May 3 20:15 docker-compose.yml
drws--Srwt+ 1 wwiii wwiii 0 May 3 17:13 games
-rws--Srwt+ 1 wwiii wwiii 530 May 3 16:50 index.php
(ignore permissions...I'm using cygwin on Windows)
The index.php file was pulled directly from the site you linked previously:
https://github.com/TheLogicMaster/phpTinfoilServer
Code:
<?php
$gameDir = "games/";
$ignoreDirs = array('.', '..', '.convert');
$games = array_diff(scandir($gameDir), $ignoreDirs);
$addr = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://$_SERVER[HTTP_HOST]/$gameDir";
$output = '{"files":[';
foreach ($games as $game) {
$dir = rawurlencode($game);
$output = $output. '{"url":"'. "$addr$dir". '","size":'. filesize($gameDir. $game). '},';
}
$output = rtrim($output, ","). '],"directories":[],"success":"Hello Piracy!"}';
echo $output;
?>
Here are the contents of my docker-compose.yml file. It's slightly modified from README.md with port 80 instead of 8080 and the directory structure for the volumes is the current ./ directory.
Code:
version: "3.4"
services:
php:
image: php:7-apache
container_name: php
restart: unless-stopped
ports:
- 80:80/tcp
volumes:
- ./:/var/www/html
- ./games:/var/www/html/Games
Simply run the following in the same directory:
docker-compose up
requires a db and google drives. I don't use either so I will leave this to someone else to try.
trying this one now.
The site is up...let's see if Tinwoo likes the format.
View attachment 308579
e: works like a champ from my raspberry pi (go Linux!)