I'm making an encoding server and need a little help
I have a directory called uploaded, and a php file called videoConverter.php and when it runs It has a loop that will convert all the video files in the uploaded directory and FTP the completed file to a streaming sever.
There is no problem with the script but the problem is once the loop is finished it won't convert any new files uploaded after the loop ends. I need to find away to execute the php file or script when files are uploaded to the uploaded directory.
I was thinking about using a cron job and running the php file every second, but wouldn't it keep running the script while it's already running?
Does anyone know a good way to approach this issue?