Page 1 of 1

Help : how to automatically upload files every 5 minutes ?

Posted: Sat Apr 24, 2010 2:19 pm
by minasaeedi
Hi ,
Can anybody help me with this php code :
I want to read the file names from a folder ( word document files or media files with extentions) and enter the url of the files in mysql database and copy or move the files to another folder ( uploads ) in the site root folder . These steps should repeat every 5 minutes.

Thank you
Mina

Re: Help : how to automatically upload files every 5 minutes

Posted: Sat Apr 24, 2010 3:11 pm
by s.dot
What have you tried?

You will need to set up a crontab entry to execute your php script that does the work for every 5 minutes.
You will want */5 * * * * as the time format.

Your php script will make use of a database connection (for mysql), directory functions such as opendir() and readdir(), and file function such as copy().

Re: Help : how to automatically upload files every 5 minutes

Posted: Sun Apr 25, 2010 1:25 am
by minasaeedi
s.dot wrote:What have you tried?

You will need to set up a crontab entry to execute your php script that does the work for every 5 minutes.
You will want */5 * * * * as the time format.

Your php script will make use of a database connection (for mysql), directory functions such as opendir() and readdir(), and file function such as copy().
Thank you