How to do in php load 50000 images of a hd
My code
<?php
$imgdir = '/media/hd-ext/Images/JPG/'; //Minha Pasta
$allowed_types = array('jpeg'); //Tipo de extensao
$dimg = opendir($imgdir);//Abre o Diretorio
while($imgfile = readdir($dimg))
{
if( in_array(strtolower(substr($imgfile,-3)),$allowed_types) OR
in_array(strtolower(substr($imgfile,-4)),$allowed_types) )
/*Se o arquivo for uma imagem, adicione-o array*/
{$a_img[] = $imgfile;}
}
echo "<ul>";
$totimg = count($a_img); //Conta o taotal de imagens
//Echo nas imagens dentro do li.
for($x=0; $x < $totimg; $x++){echo "<li><img src='" . $imgdir . $a_img[$x] . "' /></li>";}
echo "</ul>";
?>
separating by date equal to google photos
Error! loads the images but it takes 3 days to load all the images!