Update detection.php