Originally Posted by damlays
So is there any other ways possible to run this php triggered by every new uploads, or is it impossible to do that?
not impossible but would require root access to your server & it ain't straight-forward, it requires inotify-tools
on linux so perhaps google for that if you are feeling brave
The obvious alternative is CRON, add to your crontab ... check the php path with `which php`
/usr/bin/php -q /full/path/to/yourscript.php
I am not sure how your images get put on the server, perhpas your cameras have some notify action ? possibly they can send an email or call a webpage when they save the image... need more info there though.
as for not saving the same image file several times you could use md5_file()
to generate a hash of the last image moved, save that somewhere (db or text-file) then check the md5() of the image to make sure it has changed b4 you do your next move?