If you know the names of the php files that should appear on the server, then through ajax a request is made to the following php file:
<?php $filename = "test.php"; // имя файла, появление которого отслеживается //$filename = $_GET["filename"]; // это строка, если вдруг передавать имя файла из ajax-запроса // методом GET с параметром filename, например, // http://www.site.ru/check_file.php?filename=test.php // Тогда первая строка $filename = "test.php" не нужна if (file_exists($filename)) { echo "exists"; } else { echo "not exists"; } ?>
Files will be scanned in the same directory as the called script. In response, an ajax request will come either "exists" (if the file exists) or "not exists" (if the file does NOT exist). Or to form a json-answer instead of the plain text "exists" and "not exists".