I hope I can make myself clear. I have a webcam that sends a picture at every second to my website. They all sum up in the folder like this:
(IPCAM)_0_20130413145714_62.jpg [Year: 2013] [mo: 04] [Day: 13] [Hour: 14] [min: 57] [Sec: 14]
(IPCAM)_0_20130413145719_63.jpg [Year: 2013] [mo: 04] [Day: 13] [Hour: 14] [min: 57] [Sec: 19]
(IPCAM)_0_20130413145723_64.jpg [Year: 2013] [mo: 04] [Day: 13] [Hour: 14] [min: 57] [Sec: 23]
(IPCAM)_0_20130413145727_65.jpg [Year: 2013] [mo: 04] [Day: 13] [Hour: 14] [min: 57] [Sec: 27]
Can you see the pattern in the image names? I am curently using this script to display them:
<?php
$dirname = "./";
$images = glob($dirname."*.jpg");
foreach($images as $image) {
echo '<img src="'.$image.'" /><br />';
}
?>
I would like to have a calendar so I can select the [Day: **]
and get all the pictures that were taken that day.
I hope someone can help me with this code.
here is my answer using the jQuery date picker:
working example can be found here
choose 13th April 2013 in the example
As long as the photos use a consistent naming scheme you should be able to filter them by the filename using strstr. Something like this, maybe:
Did you try
with your date?
Ref: PHP manual for more options eg., http://www.php.net/manual/en/function.glob.php#110340
Make a string for today and then match it against your images. So instead of pulling all images (*) we match the image name against our today string:
I didnt test this, but:
request goes : ?y=2013&m=12&day=13