Skip to content

Instantly share code, notes, and snippets.

@sbarrat
Created January 28, 2012 11:45
Show Gist options
  • Save sbarrat/1694049 to your computer and use it in GitHub Desktop.
Save sbarrat/1694049 to your computer and use it in GitHub Desktop.
XMLRCP Client Bugzilla Login
/**
* require PEAR/XML_RPC2 library
* Works fine with bugzilla 4.0.3
*/
require_once 'XML/RPC2/Client.php';
$server = 'http://bugzilla.mydomain.com/xmlrpc.cgi';
$params = array( 'login' => 'bugzilla@mydomain.com','password' =>'mypassword', 'remember' => 1);
$client = XML_RPC2_Client::create( $server );
$userid = $client->__call( 'User.login' , $params );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment