Page 1 of 1

copy folder recursive using ftp

Posted: Wed Jul 06, 2011 4:56 am
by srdva59
hi,
i need copy a local folders and files to a ftp server
for example i call this:

copy ( $ftpserver, $user, $password , local path + file );

or copy ( $ftpserver, $user, $password , local path / folders / folder + file );

the script must see all sub dirs and creat the same struture for copy the file
that i need

any one know a script that can do that?
i have found this:

http://www.weberdev.com/get_example.php3?ExampleID=4798

but for some reason this don“t work for me.

thanks for your help
:)

Re: copy folder recursive using ftp

Posted: Wed Jul 06, 2011 6:39 am
by ben.artiss
I know CodeIgniter has a really nice FTP library which I guess you could extract. It has a mirror() method which sounds like it could work for what you want:

http://codeigniter.com/user_guide/libraries/ftp.html

I'm not exactly sure how much work would be involved but might be worth a shot.