I am trying to read all files from a directory and store it in an array.But the file which contains this code is on www.xyz.com domain and i want to check files exist on https://www.test.com/prod_images/.But glob is returning empty array.Why is it returning empty array ?
foreach (glob('https://www.test.com/prod_images/*', GLOB_ONLYDIR) as $dir) {
$dirname = basename($dir);
$items[] = $dirname;
}
print_r($items);