Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>i create bug in bugzilla using this code ...i hope this is helpful to someone</p> <pre><code>set_time_limit(0); $URI = 'your bugzilla url/xmlrpc.cgi'; $xml_data = array( 'login' =&gt; 'username', 'password' =&gt; 'password', 'remember' =&gt; 0 ); $ch = curl_init(); $file_cookie = tempnam('', 'bugzilla-cookie'); $options = array( //CURLOPT_VERBOSE =&gt; true, CURLOPT_URL =&gt; $URI, CURLOPT_POST =&gt; true, CURLOPT_RETURNTRANSFER =&gt; true, CURLOPT_HTTPHEADER =&gt; array( 'Content-Type: text/xml', 'charset=utf-8' ) ); curl_setopt($ch, CURLOPT_TIMEOUT,60); curl_setopt_array($ch, $options); $request = xmlrpc_encode_request("User.login", $xml_data); // var_dump($request); curl_setopt($ch, CURLOPT_POSTFIELDS, $request); curl_setopt($ch, CURLOPT_COOKIEJAR, $file_cookie); $server_output = curl_exec($ch); // Array( [id] =&gt; 1 ) for example print_r ($server_output); echo "&lt;br /&gt;"; $response = xmlrpc_decode($server_output); print_r ($response); $xml_data1 = array( 'product' =&gt; "Magento", 'component' =&gt; "Menu", 'summary' =&gt; "this is third testing bug", 'assigned_to' =&gt; "assigneename", 'version' =&gt; "1.6.2.0", 'description' =&gt; "This is a description of the bug", 'op_sys' =&gt; "All", 'platform' =&gt; "All", 'priority' =&gt; "Normal", 'severity' =&gt; "Trivial" ); $request = xmlrpc_encode_request("Bug.create", $xml_data1); // create a request for filing bugs curl_setopt($ch, CURLOPT_POSTFIELDS, $request); $response = xmlrpc_decode(curl_exec($ch)); print_r ($response); </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload