Merhabalar.
a diye sitem var a siteme b sitemden api olarak veri çekip kullanıcıya gösteriyorum yapı bu şekilde anlık 60-100 bin istek alsa sorun olur mu?
yani kullanıcı siteye girince api.php dosyam yükleniyor jsondaki içerikler yükleniyor kullanıcıya gösteriliyor.
veya fastly cdn kullansam bu işi çözer mi?
<?php
header('Content-Type: application/json');
$jsonFile = __DIR__ . '/match.json';
if (!file_exists($jsonFile)) {
echo "Veri dosyası bulunamadı.";
exit;
}
$jsonData = file_get_contents($jsonFile);
$matches = json_decode($jsonData, true);
if (!$matches) {
echo "Veri okunamadı.";
exit;
}
// HTML çıktısı
foreach ($matches as $cekplayer) {
echo '<div id="matchList">';
?>
<a class="single-match show" href="matches?id=<?php echo htmlspecialchars($cekplayer['yaziid']); ?>" data-matchtype="<?php echo htmlspecialchars($cekplayer['tur']); ?>" target="macth-video">
<img src="<?php echo htmlspecialchars($cekplayer['home_img']); ?>" style="border-radius:0px !important;" width="20" height="20" loading="lazy" alt="Home">
<div class="match-detail">
<div class="date"><?php echo htmlspecialchars($cekplayer['tur']); ?></div>
<div class="event"><?php echo htmlspecialchars($cekplayer['player_saat']); ?> | <?php echo htmlspecialchars($cekplayer['leauge']); ?></div>
<div class="teams">
<div class="home"><?php echo htmlspecialchars($cekplayer['home']); ?></div>
<div class="away"><?php echo htmlspecialchars($cekplayer['away']); ?></div>
</div>
</div>
<img src="<?php echo htmlspecialchars($cekplayer['away_img']); ?>" style="border-radius:0px !important;" width="20" height="20" loading="lazy" alt="Away">
</a>
<?php
}
echo '</div>';
?>