Is there a way to find and list every file in a directory of a website?
I.E.
Find every file in the directory "testdir" on "http://example.com/testdir"
Yes, if you have access to the server.
I dont think you can without having access to the server.
There is, within php:
[php]
<?
//define the path as relative
$path = "./testdir";
//using the opendir function
$dir_handle = @opendir($path) or die("Unable to open $path");
echo "Directory Listing of $path<br/>";
//running the while loop
while ($file = readdir($dir_handle))
{
echo "<a href='$file'>$file</a><br/>";
}
//closing the directory
closedir($dir_handle);
?> [/php]
If it's a remote server, you're going to need to fusker the URL, which isn't fun.
Sorry, you need to Log In to post a reply to this thread.