1
ZipFTP - Super fast (and secure) alternative to transfer files to your cPanel hosting server. Why to use slower FTP?
I tried uploaded xoops-2.0.9.2 on my Verizon DSL (1.5M/128k) using FileZilla FTP with 2 simultaneous connections. Guess what? It took me 12 minutes. But uploading xoops-2.0.10-b2 with ZipFTP was 1:12 minute only. All 1217 uploaded to server, changed folder permissions, with just one command. I am about to finish the documentation and manual part and will be releasing final version pretty soon. In the mean-time feel free to experiemnt with it, Sending any bug-report would be real great
Current version features:
* Upload files
* Extract uploaded archive
* Make directory
* Delete file / folder tree
* Change mode file/folder
* Empty trash
* Optional transfer over SSL
Features in future version
* All required database related activities.
Sample script file.
#
# Visit http://xoops.biz/x7/modules/mytricks/index.php?id=2 for more info.
#
#
# define credentials here
#
$host = 'domain.com';
$user = 'domain';
$pass = 'password';
// to install in webroot i.e. $HOME/public_html
// $xdir = '';
// to install in any sub-folder
$xdir = 'x2'; // xoops2, x2 or x7 is my favorite
// this archive should have mainfile.php in it top folder
// files inside xoops-dist/html/ will go here
$xfile = 'xoops2.tar.gz';
require_once('zipftp/FileManager.class.php');
$fm = new FileManager();
$fm->connect($host, $user, $pass);
#
# add your code here
#
# following code will upload the XOOPS files in webroot/$xdir
#
echo 'Started at ' . date("D M j G:i:s T Y") . "n";
// it may be dangerous to delete webroot by script, do manually if required
if($xdir != '') {
$fm->deleteFileFolder($xdir);
$fm->createFolder($xdir);
}
$fm->extractArchive($xfile, $xdir);
$fm->changeMode($xdir .'/mainfile.php', 0644);
$fm->changeMode($xdir .'/cache', 0777);
$fm->changeMode($xdir .'/templates_c', 0777);
$fm->changeMode($xdir .'/uploads', 0777);
$fm->emptyTrash();
echo 'Finished at ' . date("D M j G:i:s T Y") . "n";
$fm->close();
?>
I remember someone asking for a script which can reset all file/folder permissions. Doing that should be pretty easy and handy using zipftp, Isn't it?
Updated (30 March, 2005): A basic version is added into downloads.
http://xoops.biz/x7/modules/mydownloads/viewcat.php?cid=2Cheers,