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