Automatically update with AJAX
问题 I'm currently using this code on my webpage: <?php $url = "https://www.toontownrewritten.com/api/invasions"; $data = json_decode(file_get_contents($url)); if (!empty($data->invasions)) { echo "<h1 style='text-align:center;margin:auto;padding:2px;font-size:16px;font-weight:bold;text-decoration:underline;padding:2px;'>Invasion Tracker</h1>"; $i = 0; foreach($data->invasions as $title => $inv) { print "<h3 style='text-align:center;margin:auto;'><b>District:</b> {$title} </h3><br style='font-size