make sure the README will appear on github
[extjs.git] / examples / view / get-images.php
1 <?\r
2 $dir = "images/thumbs/";\r
3 $images = array();\r
4 $d = dir($dir);\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
11 }\r
12 $d->close();\r
13 $o = array('images'=>$images);\r
14 echo json_encode($o);\r
15 ?>