tobyheywood
IS-IT--Management
Dear all,
I am in the process of developing a script to upload images to a web server (via FTP) from a PC running 1 or more web cams. FTP side of things sorted.
I'm now trying to work out the best angle to approach automating the uploading of images at a set interval.
My intended route so far...
1) Set cron job to run every minute of the day
2) PHP script will only execute image uploads between hours of 8am and 6pm.
3) PHP Script will upload images every 5 seconds...
Now, my thoughts were to use some sort of while loop (after adjusting maximum script execution time to 60 seconds) which would check to see if the second at execution was one of the following;
If the second at execution matched one of the above then it would perform an upload, if not then it wouldn't.
Could someone advise me on the most appropriate REGEX string which return true if a match was found?
No matter how many times I read documentation about REGEX it fries my brain. %-)
Thank you in advance.
Regards
Toby Heywood
I am in the process of developing a script to upload images to a web server (via FTP) from a PC running 1 or more web cams. FTP side of things sorted.
I'm now trying to work out the best angle to approach automating the uploading of images at a set interval.
My intended route so far...
1) Set cron job to run every minute of the day
2) PHP script will only execute image uploads between hours of 8am and 6pm.
3) PHP Script will upload images every 5 seconds...
Now, my thoughts were to use some sort of while loop (after adjusting maximum script execution time to 60 seconds) which would check to see if the second at execution was one of the following;
Code:
00, 05, 10, 15, 20, 25, 30, etc.
If the second at execution matched one of the above then it would perform an upload, if not then it wouldn't.
Could someone advise me on the most appropriate REGEX string which return true if a match was found?
No matter how many times I read documentation about REGEX it fries my brain. %-)
Thank you in advance.
Regards
Toby Heywood