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

Error when call dll from oracle
Hi all, please help me!

I have dll write C language, I want call it from oracle procedur

tag inside php...
hi


Code: <?php
echo "<td width="$columnWidth%" align=&

Variable passed to each() is not an array or object
Hi,

This is a email a friend type of form, and it isn't working anymore.

<?

Problem with passing variables
I'm not really a php programmer so I'm really struggling with this issue.

I have a banner s

Code clarification
Hi

In the following code what could be the "search_print()" and where it could be

Session is not saving
I am not trying to do anything too fancy, I am just trying to get some $_SESSION data to save and us

php/mysql problem
Hey all,

Problem: im trying to setup a shop where people can use a drop-down list to select t

query based on 2 conditions
I want to select if the doc_type is either s OR f but this doesn't work:

Code: [Select]$query

timed header image rotation
I have a joomla site and I was trying to setup a rotating image based on timing NOT just refreshing

Mail form doesn't send Russian/Cyrillic characters correctly?
When someone enters foreign characters (like Cyrillic text, and Japanese/Chinese probably gives the

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