Is it possible to download the files in a directory using curl in PHP?

Yes, you can. Through the FTP protocol. Here's a sample directory listing, then with regards to downloading the contents, you can use ftp commands to download the contents after parsing the directory list

$curl = curl_init();
$ftpURL = "ftp://localhost/"
$ftpUsername = "username"
$ftpPassword = "password"

curl_setopt($curl, CURLOPT_URL, $ftpURL);
curl_setopt($curl, CURLOPT_USERPWD, $ftpUsername . ":" . $ftpPassword);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);

$result = curl_exec ($curl);

//Parse your result then use ftp to download the content
Member Avatar

Are these files on your server?