Re: download all packages

From: Date: Sun, 23 Mar 2003 22:38:53 +0000
Subject: Re: download all packages
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-4388@lists.php.net to get a copy of this message
ThE PhP_KiD wrote:
there is a way to download all lastest stables packages from PEAR ?
<?php require_once 'PEAR.php'; require_once 'PEAR/Config.php'; require_once 'PEAR/Command.php'; require_once 'PEAR/Registry.php'; require_once 'PEAR/Remote.php'; PEAR_Command::setFrontendType("CLI"); $ui = &PEAR_Command::getFrontendObject(); $config = &PEAR_Config::singleton(); $config->set("master_server", "pear.php.net"); $config->set("preferred_state", "stable"); $config->set("php_dir", "."); $config->set("verbose", 0); $remote = &new PEAR_Remote($config); $remoteInfo = $remote->call("package.listAll"); $cmd = &PEAR_Command::factory("download", $config); foreach($remoteInfo as $pkgn=>$pkg) { $cmd->run("download", array(), array($pkgn)); } ?>

« previous php.pear.general (#4388) next »