Process files - uploaded online or by FTP

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
mih
Forum Newbie
Posts: 12
Joined: Tue Jul 28, 2009 12:32 am

Process files - uploaded online or by FTP

Post 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
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: Process files - uploaded online or by FTP

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