kelcet
Forum Replies Created
-
Have solved issue. Went with different code. For those looking the folder where webcam images upload to is nyc . nu / TLIP / imagefilenamebydate.jpg
$dir = 'TLIP'; $base_url = '/TLIP'; $newest_mtime = 0; if ($handle = opendir($dir)) { while (false !== ($file = readdir($handle))) { if (($file != '.') && ($file != '..')) { $mtime = filemtime("$dir/$file"); if ($mtime > $newest_mtime) { $newest_mtime = $mtime; $show_file = "$base_url/$file"; } } } } print '<img src="' .$show_file. '" alt="Mooring Image">';Thanks Kevin
On left side of page I put a line above where image should display saying
“LAST IMAGE FROM WEBCAM FOLDER – below”
using code from above…
$pictures = glob(“TLIP/*.jpg”);
$no_pictures = count($pictures)-1;
$limit = $no_pictures-0;
for( $i = $no_pictures; $i >= $limit; $i–){
echo ‘‘;
}opps. No. Now I get generic image for where image should be. So we are getting closer. see on nyc.nu home page. Thanks
Hi with 3.0.5 On page I see…
$pictures = glob(“TLIP/*.jpg”); $no_pictures = count($pictures)-1; $limit = $no_pictures-0; for( $i = $no_pictures; $i >= $limit; $i–){ echo ”; }
Hi, sorry for delay currently out of country and reliable computer will try when home.
Had some comments about no current image. yachties use it to keep track of conditions in bay so did restore to Version 2.5.4. code works there.