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

Probably a simple error...
I'm getting the error -- Parse error: syntax error, unexpected '{' in /home/content/c/s/t/csteffen24

mail() problem
Hi Guys,

I've set up a contact email form. It sends the information fine, but it sends it to

array help
Does anyone know how to require 10 text fields for individual grades and output class average? (10 p

Showing selected item at top of list
Hi,

I've got a list of names which i am fetching from database like this:
$qry = db_query

upload photo limits
ive got a upload photo script and im just trying to make more secure currently it limits size and as

session variable problem
Session variable is not working in Fire fox i am getting null value but it is working fine in IE.

how do I show what a user have selected from a checkbox?
From my code below, how would i show which check boxes have been checked and which radio buttons sel

help countdown timers
hello every one,

I'd like to know how to insert many countdowns in the same page.
The dura

why aint this working?
i have this code:

Code: $num = 250;
$count = ($num - $rcount);

echo $rc

Simple Scraper... Weird Output
Okay, maybe I just need a Blue Monster and some sleep, but....

I'm scraping a ringtone site

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