2011-01-10 17 views
2

PHPによるバグダイヤルのインストールのすべての新しいバグのリストを取得できますか? 私はxmlrpc.cgiファイルがあることがわかりますが、私は任意の助けが 感謝感謝それPHPでbugzillaのバグのリストを取得

使用する方法のいずれかの例を見つけることができません!

答えて

2

は、あなたが探しているものこれは...私が使用して生のXMLを得ることができることを考え出し:

<?php 
// Add the Zend Library, make sure this is installed: sudo apt-get install libzend-framework-php 
ini_set("include_path", "/usr/share/php/libzend-framework-php"); 

// Add the AutoLoader, Calls any Library that's needed 
require_once('Zend/Loader/Autoloader.php'); 
Zend_Loader_Autoloader::getInstance(); 

// New client that calls your Bugzilla XMLRPC server 
$server = new Zend_XmlRpc_Client('http://bugzilla.yourdomain.com/xmlrpc.cgi'); 
$client = $server->getProxy(); 

// Create the Multi-Call array request 
$request = array(
    array(
     'methodName' => 'system.listMethods', 
     'params'  => array() 
    )); 

/* 
// Example: Multi call array format 
$request = array(
    array(
     'methodName' => 'system.listMethods', 
     'params'  => array() 
    ), 
    array(
     'methodName' => 'your_service.your_function', 
     'params'  => array('parm') 
    )); 

*/ 

// $response is an array() 
$response = $client->system->multicall($request); 

// Print the array 
echo print_r($response,true); 

?> 
関連する問題