TESTED!"; echo "
"; echo "season(month): " . date("m"); echo "
"; echo "daylight(hour): " . date("G"); echo "

"; $i = 0; $imgcandidates[$i] = "dummy"; foreach (scandir("./img/") as $imgfile) { if (substr($imgfile, 0, 1) != ".") { $imgcandidates[$i] = time() - strtotime(substr($imgfile, 0, 16)); echo "{ ". $imgcandidates[$i] ." : ". substr($imgfile, 0, 16) ."},"; $i++; #some borking here... } } echo ""; #TODO: a little function that returns the index # of the array element that is nearest (circularly) # to the supplied index. thus whilst building your library # of images, you get nearest match indest of error. #TODO: uploader that will take the file (or at least first 1MB), # security check it, imagemagick scale it down to 200px width, # rename it to chrono-stamp format based on reading the jpg # metadata for date/time of picture taken. ?>