2 $dir = "images/thumbs/";
\r
5 while($name = $d->read()){
\r
6 if(!preg_match('/\.(jpg|gif|png)$/', $name)) continue;
\r
7 $size = filesize($dir.$name);
\r
8 $lastmod = filemtime($dir.$name)*1000;
\r
9 $images[] = array('name'=>$name, 'size'=>$size,
\r
10 'lastmod'=>$lastmod, 'url'=>$dir.$name);
\r
13 $o = array('images'=>$images);
\r
14 echo json_encode($o);
\r