formatted detect.php