CAN ANY ONE POST HERE PHP CODE THAT SCAN ALL DIRECTORIESS ON SERVER THAN COPY ALL OF THEM ONE BY ONE TO OTHER FTP SERVER..CAN ANY ONE HELP ME???
Wallpaper Script Forum » Miscellaneous
Ftp2Ftp
(5 posts)-
Posted 1 year ago #
-
yup.. u can do through rapidleech script.. u mean servers side transload right?
zip all file and folder through your host C-panel then give download link to rapidleech (in new host server) it will start download (in hostgator it takes max 2mins to complete 10GB download).. after it completes extract that zip file from your new host C-panel
or check this (dont know its secure or not)
http://directransfer.net/start.phpPosted 1 year ago # -
In your Cpanel file manger, Zip your site folder and download it. this is can be done very easy, also don't forget your database :) this very important.
Posted 1 year ago # -
<?php
////////////////////////////////////////////////////////
// Copy directory to directory with all sub-directory and files using FTP
// By:
// Ahmed Samir
// asamir@asamir.net
// www.asamir.net
//
////////////////////////////////////////////////////////function ftp_copyAll($conn_id, $src_dir, $dst_dir) {
if(is_dir($dst_dir)){
return "
Dir <b> $dst_dir </b> Already exists
";
}else{
$d = dir($src_dir);
ftp_mkdir($conn_id, $dst_dir); echo "creat dir <b><u> $dst_dir </u></b>
";
while($file = $d->read()) { // do this for each file in the directory
if ($file != "." && $file != "..") { // to prevent an infinite loop
if (is_dir($src_dir."/".$file)) { // do the following if it is a directory
ftp_copyAll($conn_id, $src_dir."/".$file, $dst_dir."/".$file); // recursive part
} else {
$upload = ftp_put($conn_id, $dst_dir."/".$file, $src_dir."/".$file, FTP_BINARY); // put the files
echo "creat files::: <b><u>".$dst_dir."/".$file ." </u></b>
";
}
}
ob_flush() ;
sleep(1);
}
$d->close();
}
return "<font size=3><b>All Copied ok </b></font>";
}// connect to FTP server
$ftp_user_name = ' ';
$ftp_user_pass = ' ';
$ftp_server = ' ';$conn_id = @ftp_connect($ftp_server) or die("Couldn't connect to $ftp_server");
// login into FTP server
if (@ftp_login($conn_id, $ftp_user_name, $ftp_user_pass)) {
//echo "Connected as $ftp_user_name@$ftp_server\n";
ftp_set_option($conn_id, FTP_TIMEOUT_SEC, 1000); // Set the network timeout to 10 seconds$copy_result = ftp_copyAll($conn_id, 'Folder', 'FolderCopy');
echo $copy_result;
}else{
echo "Couldn't connect as $ftp_user\n";
}@ftp_close($conn_id); // colse of ftp_connect
// @ftp_quit($conn_id);?>
Posted 1 year ago # -
i used this code but it only copy one file and hang at it .. i does not copy a single bit of file just a epty file is created on remote server.
Posted 1 year ago #
Reply
You must log in to post.



