Hi, i am developing a flash based webcam site that works by displaying uploaded images from users webcams from our servers. I have everything working but i want to archive users broadcasts. Basically the webcam program just uploads the new image to a server in a directory in their name, it then updates a database to show the last compeleted uploaded image, therefore when the viewing program (Flash, Java, etc) reads the image, we have no major bandwidth contentions unlike if we were using the broadcaster as an image server. This does'nt achieve great fps but for the 56K modem users, it allows them to broadcast to virtually unlimited viewers. So i thought if the images are being uploaded, i may as well archive them for the users to view again. I could do this by logging frame number starts and finish but then i would have far to files in a directory, so i want to create daily archives. I started to pursue this with the brodcaster doing the work but i feel this slows things down too much when a php script could do it all in one go and get correct time stamps.
Basically, i need to do the following ( I can do all the validating of usernames and password via the broadcaster already) :-
Check a directory exists, i.e the username, if not create one.
Then check to see if a directory exists that matches the current date in a form like 290403 (29-day 04-Month 03-Year), if not create one. i can then log this along with frame start and finish numbers in a database for later viewing.
However, if a users logs in and performs a show 4 times in one day, i am going to get alot of overwriting of images. So maybe i should create another sub-directory called 'session1', 'session2', etc.
The broadcaster uploads images like this 'username1.jpg' (username - the users login name, 1 being the current broadcasts frame number, -.jpg the file format)
My problem is that i have alot of knowledge with php database working but none of remote file management. I need to know how to create and delete directories, copy, rename and delete files, check for existing directories and files, etc, etc.
I have checked out php.net but have had no real luck but i am sure there must be a tutorial on this subject.
I would be very grateful to any help or advice, the site will rock. The first ALL flash webcam site on the net(I think)
Regards
Jules
jules@hungrybear.co.uk