We have a web camera that posts an image to our web server every minute. The filename of each image uses the current time to make it unique.
I need a simple PHP script to retrive the most recent image from the most recently created folder, rename and move it to a new location on the same server.
The web cam saves images using the following structure:
[url removed, login to view]
yyyy-mm-dd relates to the date the image was created.
[url removed, login to view] relates to the time the image was created.
- The script needs to locate the most recently created folder
- Within the most recently created folder, the script needs to locate the most recently saved image. - The image needs to be renamed to '[url removed, login to view]' and moved to [url removed, login to view] - Any remaining images in the original folder should be deleted and the folder deleted as well. - Any other legacy folders within the \images\ folder that have the format \yyyy-mm-dd\ should also be deleted and their contents also removed.
1) All deliverables will be considered "work made for hire" under U.S. Copyright law. Employer will receive exclusive and complete copyrights to all work purchased. (No GPL, GNU, 3rd party components, etc. unless all copyright ramifications are explained AND AGREED TO by the employer on the site per the worker's Worker Legal Agreement).
2) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done.
3) Deliverables must be in ready-to-run condition, as follows (depending on the nature of the deliverables):
a) For web sites or other server-side deliverables intended to only ever exist in one place in the Employer's environment--Deliverables must be installed by the Worker in ready-to-run condition in the Employer's environment.
b) For all others including desktop software or software the employer intends to distribute: A software installation package that will install the software in ready-to-run condition on the platform(s) specified in this project.
PHP script to run on a Linux web server.