<?php
require_once 'config.php';
$token = isset($_GET['token']) ? $_GET['token'] : '';
if ($token !== SUB_TOKEN) { header('HTTP/1.0 403 Forbidden'); die('  !'); }
$config_files = glob(CONFIGS_DIR . '*.conf');
if (empty($config_files)) die('  .');
$all = '';
foreach ($config_files as $file) { $all .= trim(file_get_contents($file)) . "\n\n"; }
$all = trim($all);
header('Content-Type: text/plain; charset=utf-8');
echo base64_encode($all);
exit;
?>