When I run: 

```
$url='foldername';
$dir = opendir($url);

//List files in images directory
while (($file = readdir($dir)) !== false)
  {

  echo "filename: " . $file . "<br />";
  }
closedir($dir); 

```

...it outputs:

```
filename: a.gif 
filename: file.html
filename: g.gif
filename: gg.html

```

I would like to see all the files and folders on another server from the URL:

```
$url="http ://example.com"

```

How do I find the files and folder names from `example.com`?