Files
Admin Nasledstvo ac168868ee Initial import
2026-05-01 20:52:04 +03:00

57 lines
1.4 KiB
PHP

<?php
set_time_limit(86400);
if(!empty($_GET['ip'])) {
echo $_SERVER['REMOTE_ADDR'];
exit;
}
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL & ~E_DEPRECATED & ~E_USER_DEPRECATED);
ini_set("memory_limit", "1024M");
if(isset($_GET['phpinfo'])) {
echo phpinfo();
exit;
}
$uri = explode('?', $_SERVER['REQUEST_URI'])[0];
$parts = explode('/', $uri);
if ($parts[sizeof($parts) - 1] != '') {
$q = $_SERVER['QUERY_STRING'] ? '?' . $_SERVER['QUERY_STRING'] : '';
header('Location: ' . $uri . '/' . $q);
exit;
}
if (!function_exists('getallheaders')) {
function getallheaders()
{
$headers = [];
foreach ($_SERVER as $name => $value) {
if (substr($name, 0, 5) == 'HTTP_') {
$headers[str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', substr($name, 5)))))] = $value;
}
}
return $headers;
}
}
session_start();
// comment out the following two lines when deployed to production
if (in_array($_SERVER['REMOTE_ADDR'], ['31.18.251.105', '178.75.201.64', '31.18.251.154', '95.90.241.112'])) {
defined('YII_DEBUG') or define('YII_DEBUG', true);
defined('YII_ENV') or define('YII_ENV', 'dev');
}
require __DIR__ . '/vendor/autoload.php';
require __DIR__ . '/vendor/yiisoft/yii2/Yii.php';
$config = require __DIR__ . '/config/web.php';
(new yii\web\Application($config))->run();
//Chavdar-SVR01