how can I find out, if file exist in folder, which is password protected via .htaccess (I know password)
This not working:
$filename = "http://username:password@website.com/pictures/12.jpg"; // folder have password
if (file_exist($filename)) {
return TRUE;
} else return FALSE;
but if some other folder dont have .htacces password, this code nicely works:
$filename = "http://website.com/pictures_without_password/12.jpg"; // folder dont have password
if (file_exist($filename)) {
return TRUE;
} else return FALSE;
Thanks