download directory onto C drive


Posted on 16th Feb 2014 07:03 pm by admin

I am attempting (if this is possible) to write a routine to automatically dump the contents of a directory on the server into a directory on the local C drive.

I started out like this :

Code: $conn_id = ftp_connect($myurl);
$login_successful = ftp_login($conn_id, $id, $password);
if ($login_successful) {
echo '<H2>Download underway ...'.PHP_EOL;
$contents = ftp_nlist($conn_id, $the_appropriate_path);
foreach ($contents as $file) {
echo $file.'<BR>'.PHP_EOL;
}



And this does exactly as expected, it lists all the files in the directory on the server !


Now I have to dump them onto my C drive. Is this possible using ftp_get, or do I have to use some other way ?

No comments posted yet

Your Answer:

Login to answer
169 Like 27 Dislike
Previous forums Next forums
Other forums

Downloading file (Headers)
I'm trying to make users download a file, but they must wait 60 seconds before it begins.

But

Trying to add functions to table
I have this list of characters and I'm trying to figure out what I have to do to put the results of

How can i use [] tags instead of <> tags for profiles??
On my site im making ive made it so u can register, login and u have a profile which u can update..<

cstdatomic (c++0x std::atomic) / g++ 4.4
Hello,

I'm trying to use cstdatomic (std::atomic in the upcoming c++0x standard) in g++

problem with query error
First Thanks to those who helped me on my previous posts, and the following code i'm using is not mi

Sending a hyperlink through mail
HI all,
I am sending a mail to outlook mailbox of a user using FM SO_NEW_DOCUMENT_ATT_S

help understanding hidden input w/ php
hello i'm doing a tutorial where there are multiple forms for an edit page for a user to update thei

how to hide input fields on selection screen using variant attribute
Hello all,

I want to know how to hide input fields on selection screen using variant attr

article site help remaining text
Hi all hope you will be fine
I am creating a article site in this site i want to put some text on

How do I use ValidatorCallout extender in Login control?
Hi,I'd like to customize the look and feel of the login control a little bit. One thing I'd love to

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash