scratch – Rev 50
?pathlinks?
<?php
###########################################################################
## Copyright (C) Wizardry and Steamworks 2017 - License: GNU GPLv3 ##
###########################################################################
require_once('inc/pseudocrypt.php');
require_once('inc/functions.php');
require_once('config.php');
if (!isset($_GET['o']) or empty($_GET['o'])) {
http_response_code(404);
return;
}
$file = array_shift(
preg_grep(
"/$_GET[o]/",
scandir($STORE_FOLDER)
)
);
if(!isset($file) or empty($file))
return;
header("Content-type: ".mime_content_type($STORE_FOLDER.'/'.$file));
header('Expires: 0');
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Pragma: public');
echo atomized_get_contents($STORE_FOLDER.'/'.$file);