imdb bot scripti ile çekilen filmlere ait posterleri toplu olarak galeri halinde göstermek için aşağıdaki kodu kullanabilirsiniz. 30 ar poster halinde ve sayfalama özelliği var.

dosya ismine resim.php diyoruz

<!DOCTYPE html>
<html>

<body>
<table width="655" height="5" bgcolor="#ffffff" border="0" cellspacing="8"  cellpadding="8" align="center">

<table width="655" height="400" bgcolor="#ffffff" border="0" cellspacing="8"  cellpadding="8" align="center">
<td>
<center>
<?php

$dizin = "posters";
$tutucu = opendir($dizin);
while($dosya = readdir($tutucu)){
if(is_file($dizin."/".$dosya))
$resim[] = $dosya;
}
closedir($tutucu);


$limit = 30; //Bir sayfada gösterilecek resim sayısı
$sf = $_GET["sf"];
if($sf < 1) $sf = 1;
$toplam = count($resim);


$kactan = ($sf-1) * $limit;
$kaca = ($kactan+$limit);
if($kaca > $toplam) $kaca = $toplam;


for($i=$kactan; $i < $kaca; $i++){
echo "
<a href='".$dizin."/".$resim[$i]."' target='_blank'>
<img onContextMenu='return false' src='".$dizin."/".$resim[$i]."' width='100'  height='100' border='0'></a>";
}
echo"</br>";

for($i=1; $i < $toplam / $limit; $i++){
if($sf == $i)
echo "$in"; else
echo "<a href='resim.php?sf=$i'>$i</a> - ";
}
?>
</center><tr></td></tr></table>
<tr></td></tr></table>

</body>
</html>
kaynak