Well why not put a text file in the root directory, then check is that file exists in your script.

PHP Code:
include_once 'File/Find.php';

list (
$directories$files) = File_Find::maptree('c:/base/dir'); 
You need PEAR though