/* Decoded by unphp.net */
ini_set('max_execution_time', 3600);
$conn = new mysqli($host, $user, $password, $dbname);
// BaÄlantıyı kontrol et
if ($conn->connect_error) {
die("BaÄlantı hatası: " . $conn->connect_error);
}
// Backlink verilerini veritabanından al
$sql = "SELECT id, url FROM backlink WHERE durum = 0";
$result = $conn->query($sql);
if ($result->num_rows > 0) {
while ($row = $result->fetch_assoc()) {
$id = $row["id"];
$url = $row["url"];
// Yorum gönderme iÅlemi için POST verilerini hazırla
$yorum = $_POST["yorum"];
$baslik = $_POST["ad"];
$link = $_POST["link"];
$email = substr(md5(time()),0,8).'@hotmail.com';
$urli = rtrim(parse_url($url, PHP_URL_HOST), '/') . '/wp-comments-post.php'; // Ana alanı al ve /wp-comments-post.php ekleyin
$button = "Gönder";
$post_id = 1; // Yorumun gönderileceÄi gönderinin ID'sini ayarlayın
$ch = curl_init();
curl_setopt($ch, CURLOPT_HEADER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 0);
curl_setopt($ch, CURLOPT_URL, $urli);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5);
curl_setopt($ch, CURLOPT_TIMEOUT, 10); // 10 saniye süre
curl_setopt($ch, CURLOPT_ENCODING, 'gzip, deflate');
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, 'comment=' . $yorum . '&author=' . $baslik . '&email=' . $email . '&url=' . $link . '&submit=' . $button . '&comment_post_ID=' . $post_id . '&comment_parent=0');
$response = curl_exec($ch);
$response_url = curl_getinfo($ch, CURLINFO_REDIRECT_URL);
$http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE); // HTTP durum kodunu al
curl_close($ch);
// Ä°steÄin cevabını kaydedin
$response_data = curl_multi_getcontent($ch);
curl_close($ch);
$message = ""; // Hata mesajını saklamak için boŠbir string
if ($http_code == 200) {
$tarih = date("Y-m-d H:i:s");
// Ä°stek baÅarılı ise sayfanın içeriÄini göster
$message = "Yorum gönderildi: Yorum ID: $id - İstek Cevabı: " . htmlspecialchars($response_data) . "
";
$update_sql = "INSERT INTO durumlar (site, tarih, url, durum) VALUES ('$link', '$tarih', '$url', '1')";
$conn->query($update_sql);
} elseif ($http_code == 301 || $http_code == 302) {
$tarih = date("Y-m-d H:i:s");
$message = 'HTTP Kodu: ' . $http_code . ' - Sayfa kaldırılmıÅ';
$update_sql = "INSERT INTO durumlar (site, tarih, url, durum) VALUES ('$link', '$tarih', '$url', '2')";
$conn->query($update_sql);
} elseif ($http_code == 307) {
$tarih = date("Y-m-d H:i:s");
$message = 'HTTP Kodu: ' . $http_code . ' - Tekrar denenmesi gerekiyor';
$update_sql = "INSERT INTO durumlar (site, tarih, url, durum) VALUES ('$link', '$tarih', '$url', '2')";
$conn->query($update_sql);
} elseif ($http_code == 405) {
$tarih = date("Y-m-d H:i:s");
$message = "HTTP Kodu: $http_code - Sitenin post iÅlemeni desteklemiyor";
$update_sql = "INSERT INTO durumlar (site, tarih, url, durum) VALUES ('$link', '$tarih', '$url', '2')";
$conn->query($update_sql);
} elseif ($http_code == 0) {
$tarih = date("Y-m-d H:i:s");
$message = "HTTP Kodu: $http_code - Sayfa zaman aÅımına uÄradı";
$update_sql = "INSERT INTO durumlar (site, tarih, url, durum) VALUES ('$link', '$tarih', '$url', '2')";
$conn->query($update_sql);
} else {
$tarih = date("Y-m-d H:i:s");
$message = 'HTTP Kodu: ' . $http_code . ' - Sunucudan yanıt alınamıyor';
$update_sql = "INSERT INTO durumlar (site, tarih, url, durum) VALUES ('$link', '$tarih', '$url', '2')";
$conn->query($update_sql);
}
// BaÅarılı mesajı daha belirgin yap
if (strpos($message, 'Yorum gönderildi') !== false) {
$message = '' . $message . '
';
$tarih = date("Y-m-d H:i:s");
$update_sql = "INSERT INTO durumlar (site, tarih, url, durum) VALUES ('$link', '$tarih', '$url', '1')";
$conn->query($update_sql);
} else {
$message = '' . $message . '
';
$tarih = date("Y-m-d H:i:s");
$update_sql = "INSERT INTO durumlar (site, tarih, url, durum) VALUES ('$link', '$tarih', '$url', '2')";
$conn->query($update_sql);
}
echo $message;
$update_sql = "UPDATE backlink SET durum = 1 WHERE id = $id";
$conn->query($update_sql);
ob_flush();
flush();
}
} else {
echo 'Backlink verisi bulunamadı.
';
}
$conn->close();