Question: I have a url, `http://www.mysite.com/images` and the `images` directory allows Directory Listings. How can I get the files in that directory with PHP?

Answer: 
You can use regex to take urls from listing. (No you can't use DOMDOCUMENT as it's not a valid HTML)
// tho a late-comer, this one seems a bit more reader-friendly if not faster

```
$url = 'http://whatevasite/images/';
$no_html = strip_tags(file_get_contents($url));
$arr = explode('Parent Directory', $no_html);
$files = trim($arr[1]);
$files = explode("\n ", $files);
var_dump($files);

```