Jump to content

automatic upload


Aresk

Recommended Posts

I want to upload a file automatically at any time from my home PC to a website I am developing. I can upload OK using a form with 'enctype="multipart/form-data"' but this requires manual operation to select a file and to submit the upload request. Is there a way the upload process can be made to happen with no operator present?

 

I also want to download from the website to my PC automatically ie. download a file (as it becomes available) from the website to a specified location on my PC, without operator intervention. Help. Thanks.

Link to comment
Share on other sites

Well, a cron job would only work if you also ran a web server on your home PC and the cron job ran there. The remote web server cannot push/pull files from your home PC, your home PC will have to do the work.

 

I think there are probably plenty of solutions that have nothing to do with PHP. I would look for a utility that will sync files via FTP and run that on your home PC. I know that such utilities will sync local files to a remote location, but I've never tried to see if they will sync files from a remote location to a local one, but I wouldn't see why there wouldn't be such an option.

 

You could start by looking at SyncBack: http://www.2brightsparks.com/syncback/index.html

Link to comment
Share on other sites

I just checked my version of SyncBackSE and it does support backing up TO an FTP server as well as backing up FROM an FTP server. So, you could have two separate backups scheduled - one to bring down new files from the server and one to put new ones on the FTP server. Or, if the files to be transferred between the two are in a single location on both machines you could set up a sync.

Link to comment
Share on other sites

Well, a cron job would only work if you also ran a web server on your home PC and the cron job ran there. The remote web server cannot push/pull files from your home PC, your home PC will have to do the work.

 

I think there are probably plenty of solutions that have nothing to do with PHP. I would look for a utility that will sync files via FTP and run that on your home PC. I know that such utilities will sync local files to a remote location, but I've never tried to see if they will sync files from a remote location to a local one, but I wouldn't see why there wouldn't be such an option.

 

You could start by looking at SyncBack: http://www.2brightsparks.com/syncback/index.html

 

I was thinking using a cron job to run a PHP script with FTP commands. But, you're right, if you're going that route PHP probably isn't the best option.

Link to comment
Share on other sites

Thanks. Valuable advice. I conclude the solution lies in using ftp somehow on my home computer leaving me with a steep learning curve but at least on the right track.

Steep learning curve? I think you are making it more difficult than it needs to be. There are utilities (such as SyncBack) that will do all the work for you. There is even a free version of SyncBack, but I'm not sure if it allows for FTP. But, even the SE version is relatively cheap.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.