Page 1 of 1

Remote directory file listing?

Posted: Fri May 21, 2004 8:54 pm
by SleepyP
This seems like a longshot, but is there any way for a PHP script to retrieve a list of filenames for a remote directory (i.e. http://www.somedomain.com/somedir/) ? i would think this impossible but it would be really nice if it is possible....

Posted: Fri May 21, 2004 11:53 pm
by feyd
depending on what kind of access your server/you have to the other server, php could ftp or telnet in and get the list.. If you have no relation to the remote site, the best you can do (without getting into serious trouble is scan all their public files for references to that specific directory. Either way.. a bit of a pain... and potentially violating that site's usage agreements.