= 70 = Active define('SCORE_WARMING', 50); // 50-69 = Warming // < 50 = Restricted function checkDomainReputation($domain) { $tldScores = [ 'com' => 95, 'net' => 90, 'org' => 90, 'io' => 75, 'co' => 75, 'de' => 85, 'fr' => 85, 'uk' => 85, 'eu' => 80, 'info' => 60, 'biz' => 55, 'charity' => 45, 'site' => 40, 'xyz' => 40, 'top' => 35, 'click' => 30 ]; $parts = explode('.', $domain); $tld = strtolower(end($parts)); $score = $tldScores[$tld] ?? 50; // Blacklist check $blacklists = ['zen.spamhaus.org', 'bl.spamcop.net']; $blHits = 0; foreach ($blacklists as $bl) { if (@dns_get_record("$domain.$bl", DNS_A)) { $score -= 15; $blHits++; } } // DNS bonus if (@dns_get_record($domain, DNS_A)) $score += 3; if (@dns_get_record($domain, DNS_MX)) $score += 2; $score = max(0, min(100, $score)); // Determine status if ($score >= SCORE_ACTIVE) { $status = 'active'; $statusLabel = 'ACTIVE'; $statusColor = '#10b981'; $recommendation = 'Ready for full volume sending'; $maxDaily = 'Unlimited'; } elseif ($score >= SCORE_WARMING) { $status = 'warming'; $statusLabel = 'WARMING'; $statusColor = '#f59e0b'; $recommendation = 'Use progressive volume: Start 100/day, increase 20% daily'; $maxDaily = 'Start 100, +20%/day'; } else { $status = 'restricted'; $statusLabel = 'RESTRICTED'; $statusColor = '#ef4444'; $recommendation = 'Not recommended. Use only as backup or acquire better domain.'; $maxDaily = 'Backup only'; } $rating = $score >= 80 ? 'Excellent' : ($score >= 60 ? 'Good' : ($score >= 40 ? 'Fair' : 'Poor')); return [ 'score' => $score, 'rating' => $rating, 'tld' => ".$tld", 'status' => $status, 'statusLabel' => $statusLabel, 'statusColor' => $statusColor, 'recommendation' => $recommendation, 'maxDaily' => $maxDaily, 'blacklistHits' => $blHits, 'warmingPlan' => $status === 'warming' ? [ 'day1' => 100, 'day2' => 120, 'day3' => 144, 'day4' => 173, 'day5' => 207, 'day6' => 249, 'day7' => 299, 'day14' => 743, 'day21' => 1847, 'day30' => 5765 ] : null ]; } function testServer($ip) { $fp = @fsockopen($ip, 80, $errno, $errstr, 5); if ($fp) { fclose($fp); return ['status' => 'online']; } return ['status' => 'offline', 'error' => $errstr]; } // Handle AJAX if (isset($_REQUEST['action'])) { header('Content-Type: application/json'); switch ($_REQUEST['action']) { case 'test': echo json_encode(testServer($_POST['ip'] ?? '151.80.235.110')); break; case 'check_domain': echo json_encode(checkDomainReputation($_POST['domain'] ?? '')); break; case 'deploy': $ip = $_POST['ip'] ?? ''; $pass = $_POST['password'] ?? ''; $domain = $_POST['domain'] ?? $ip; if (!$ip || !$pass) { echo json_encode(['success' => false, 'message' => 'IP and password required']); break; } $script = '#!/bin/bash set -e apt-get update -qq apt-get install -y -qq nginx php-fpm mkdir -p /var/www/tracking/{c,o,u} /var/log/tracking cat > /var/www/tracking/c/index.php << "INNEREOF" ["timeout" => 3]]); $r = @file_get_contents("http://'.$wevads_ip.':5821/api/track/click?data=".urlencode($d), false, $ctx); $j = @json_decode($r, true); if (isset($j["redirect"])) { header("Location: ".$j["redirect"], true, 302); exit; } header("Content-Type: image/gif"); echo base64_decode("R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"); INNEREOF cat > /var/www/tracking/o/index.php << "INNEREOF" ["timeout"=>1]])); header("Content-Type: image/gif"); echo base64_decode("R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"); INNEREOF cat > /var/www/tracking/u/index.php << "INNEREOF" /etc/nginx/sites-available/tracking << NGINXEOF server { listen 80; server_name '.$domain.' _; root /var/www/tracking; location /c/ { try_files \\\$uri /c/index.php; } location /o/ { try_files \\\$uri /o/index.php; } location /u/ { try_files \\\$uri /u/index.php; } location ~ \\.php\\\$ { include snippets/fastcgi-php.conf; fastcgi_pass unix:/var/run/php/php\${PHP_VER}-fpm.sock; } } NGINXEOF ln -sf /etc/nginx/sites-available/tracking /etc/nginx/sites-enabled/ rm -f /etc/nginx/sites-enabled/default chown -R www-data:www-data /var/www/tracking /var/log/tracking nginx -t && systemctl restart nginx php*-fpm echo "DEPLOY_SUCCESS"'; $tmpFile = '/tmp/deploy_' . md5($ip) . '.sh'; file_put_contents($tmpFile, $script); $cmd = "sshpass -p " . escapeshellarg($pass) . " ssh -o StrictHostKeyChecking=no -o ConnectTimeout=10 root@$ip 'bash -s' < $tmpFile 2>&1"; $output = shell_exec($cmd); @unlink($tmpFile); echo json_encode([ 'success' => strpos($output, 'DEPLOY_SUCCESS') !== false, 'output' => $output ]); break; } exit; } ?>
Deploy tracking servers and manage domain warming for optimal deliverability