I'm just starting to learn cURL and now I simply try all kind of things to get used to the options that cURL give me.Here is a simple script which I use to connect and retrieve data from a current site

```
<?php

      $ch=curl_init();
      $header[] = "Cache-Control: max-age=0";
      $header[] = "Connection: keep-alive";
      $header[] = "Keep-Alive: 300";
      $header[] = "Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7";
      $header[] = "Accept-Language: en-us,en;q=0.5";
      $header[] = "Pragma: "; // browsers keep this blank.
      curl_setopt($ch, CURLOPT_URL, "http://img2.somesite.net/bitbucket/");
      curl_setopt($ch, CURLOPT_HEADER, $header);
      curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
      curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
      $a=curl_exec($ch);
      curl_close($ch);
      echo $a;

?>

```

I want to get the images stored there, but obviously I miss something.I'm not sure how it should be done.When you write `http://img2.somesite.net/bitbucket/pic.jpg` the image is loaded.I want to get the name of all files that are there, or maybe I should trigger a command which will download the images and then check them on the PC...I don't know is this possible with cURL and hwo could be done?
 Also when I leave it

```
http://somesite.net/

```

I get the resource back, so basicly this works...

Thanks 

Leron