copy folder recursive using ftp

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
srdva59
Forum Commoner
Posts: 77
Joined: Sun Feb 15, 2009 10:58 am

copy folder recursive using ftp

Post 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
:)
ben.artiss
Forum Contributor
Posts: 116
Joined: Fri Jan 23, 2009 3:04 pm

Re: copy folder recursive using ftp

Post 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.
Post Reply