Re: FTP routine
| From: | Michael Sims | Date: | Thu, 04 Jul 2002 20:17:49 +0000 |
| Subject: | Re: FTP routine | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-105497@lists.php.net to get a copy of this message | ||
On Thu, 4 Jul 2002 20:43:25 +0100, you wrote:
>Not really a PHP question - more an FTP protocol question - try reading the
>FTP RFC at http://www.ietf.org/rfc/rfc959.txt
>
>However, in a nutshell, to get all of the files in a directory -
>
>1. get a listing of that directory (read the RFC for instructions) and store
>the filenames in an array.
>2. go through the array using a foreach - to 'RETR' each file.
It's much easier to do the following:
cd /path/to/directory/
prompt
mget *