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 :

Did you know?Explore Trending and Topic pages for more stories 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

What's wrong with my code
sobbing for many days, still don't know why please Help. Why my page isn't posted correctly. In a

Registration
ok so i have a site where people can register and login which works now thanks to someone on here th

Setting condidtions for an input box
Hi all,

I would like to set a condition in a txt box that says the number a user enters has t

Array question
Does anyone know how to create a program that takes the $ amount for 8 different departments and gi

validating url
im trying to validate url's sent to me by a form
the url's im collecting are for placing banners

Strip Slashes Help
I've got a script that i've downloaded of the net to edit multiple fields from my sql database, and

Convert .fdf to .pdf
I currently have a web form that uploads the form data to an .fdf file and emails it.

However

Seperate team from score
I am writing a site that does a NFL Pick 'em type application and I have a feed that gives me the sc

New Search Engine
Hey everyone,

I have a ZIP Code Radius search engine already functional. it displays all of t

asp authentication problem
Hello all, I want to use the asp authentication (from asp.net configuration) in my web site. there

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