Help : how to automatically upload files every 5 minutes ?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
minasaeedi
Forum Newbie
Posts: 6
Joined: Sat Jan 16, 2010 2:39 am

Help : how to automatically upload files every 5 minutes ?

Post 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
User avatar
s.dot
Tranquility In Moderation
Posts: 5001
Joined: Sun Feb 06, 2005 7:18 pm
Location: Indiana

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

Post 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().
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
minasaeedi
Forum Newbie
Posts: 6
Joined: Sat Jan 16, 2010 2:39 am

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

Post 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
Post Reply