I have a security camera that I want the JPGs courtesy of Fwink kept off site...
Although apparently I am getting rusty with php...
I tried
That created a file in the main directory that looked sorta like "camshots/10/09/16/5.10.55.jpg"Code:<? php if(time() >= file_get_contents('time.txt')+10){ $a = 'camshots/' . date('y') . '/' . date('m') . '/' . date('d') . '/' . date('H.i.s') . '.jpg'; copy('camshots/webcam.jpg',$a); file_put_contents('time.txt',time()); } ?>
So I tried adding
before the copy code however that just made the script non responsive...Code:if(!file_exists('camshots/' . date('y') . '/' . date('m') . '/' . date('d') . '/')) mkdir('camshots/' . date('y') . '/' . date('m') . '/' . date('d') . '/' );
Any suggestions?
Better methods?
Leaner code to do it?
Thanks in advance




Reply With Quote