Page 1 of 1

Process files - uploaded online or by FTP

Posted: Sat Dec 12, 2009 4:08 pm
by mih
Hello,

I have a page up.php for uploading a file and after submit the other page up_process.php does the processing, read the file with

Code: Select all

$f  = fopen ($_FILES['books']['tmp_name'], "r");
Now I would like to process files that the user uploads through FTP.

I will use a cronjob to read the respective files.

How could I use the functionality I already have for processing manually uploaded files ?

Is there any smart way to call up_process.php from the script where I would read the FTP-ed files ?

Thank you

Re: Process files - uploaded online or by FTP

Posted: Sat Dec 12, 2009 5:49 pm
by requinix

Code: Select all

$f  = fopen ($_FILES['books']['tmp_name'], "r");
Change that to use the path to the FTP-uploaded file and, as long as you aren't using is_uploaded_file or move_uploaded_file, that should be enough. However you want to accomplish that.