3 if (count($argv) != 1) {
4 echo "usage: $argv[0]\n";
8 $wsdl = getenv('PHPWIKI_WSDL_URL');
10 $wsdl = "http://phpwiki.fr/PhpWiki.wsdl";
14 $client = new SoapClient($wsdl);
15 } catch (SoapFault $fault) {
16 die($fault->faultstring);
19 $phpwiki = getenv("HOME")."/.phpwiki";
20 if (!file_exists($phpwiki)) {
21 $login = readline("Login: ");
22 $password = readline("Password: ");
23 $credentials = base64_encode($login.':'.$password);
24 if ($fp = fopen($phpwiki, 'w')) {
25 fprintf($fp, "%s:%s", $login, $password);
27 chmod($phpwiki, 0600);
30 $credentials = base64_encode(file_get_contents($phpwiki));
34 $plugins = $client->listPlugins($credentials);
35 for ($i = 0; $i < count($plugins); $i++) {
39 } catch (SoapFault $e) {
40 echo 'Error: ' . $e->getMessage() . "\n";