Jump to content

CCraft

New Members
  • Posts

    1
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

CCraft's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Greetings everyone, What I have is a server with some web cam software installed. The software saves images whenever motion is detected. I have an apache/php server going to serve a php page that I want to display the images. Its just a side DIY project at my home. Here is what I have so far. [code] <html> <head></head> <body> <table> <?php $dir = "."; if (is_dir($dir)) {     if ($dh = opendir($dir)) {         while (($file = readdir($dh)) !== false) {             if (preg_match("/.jpg/", $file)) {                 $exif = exif_read_data($file, 0, true);                 echo "<tr>";                 echo "<td valign=top><a href=$dir/$file><img src=$dir/$file width=250 height=200></a><td>";                 echo "<td valign=top><font size=-1>";                 echo "File: <b>" . $exif['FILE']['FileName'] . "</b><br/>"; echo "Size" . ': ' . filesize($file) . ' bytes' . "<br/>"; echo date ("F d Y H:i:s.", filemtime($file));                 echo "</font></td>";                 echo "</tr>";           }         }       closedir($dh);   } } ?> </table> </body> </html> [/code] I am trying to do 2 things that I haven't been able to figure out. 1) I don't want to display any images will a filesize less than 100000 bytes. 2) I want to order the images by their creation date with the most recent at the top. I just have all the images and the script in the root directory of my web sever. Any help with figuring this out would be great. Thank you in advance, Chris
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.