Hello everyone,
I have installed eGroupware (version 1.4) on my PC with XMLRPC on which I’ve done some development :
//code of session.php
include_once(‘function.php’);
//connexion
$function = ‘system.login’;
$param = array(‘username’ => ‘…’, ‘password’ => ‘…’);
$auth = ‘’;
$res= test($function,$param,$auth);
//Session
$auth1 = base64_encode($res[‘sessionid’] . ‘:’ . $res[’$kp3’]);
//FIn code of session.php
//code of function.php
function test($function,$param, $auth)
{
$request = xmlrpc_encode_request($function,$param);
if($auth!='') $auth = "\nAuthorization: Basic $auth";
$context = stream_context_create(array('http' => array(
'method' => "POST",
'header' => "Content-Type:text/xml" . $auth,
'content' => $request
)));
$file = file_get_contents("http://rdac.zoomacom.org/egw/xmlrpc.php", false, $context);
$response = xmlrpc_decode($file);
if (xmlrpc_is_fault($response)) {
trigger_error("xmlrpc: $response[faultString] ($response[faultCode])");
}
return($response);
}
//Fin code function.php
and the code of principal page :
include_once(‘lib/function.php’);
include_once(‘lib/session.php’);
//requête
$function2 = ‘addressbook.boaddressbook.project’; => New function create for me return list projet
$res1= test($function2,false,$auth1);
$test22 = $res1;
header(‘Content-type: text/xml;’);
echo ‘<?xml version="1.0" encoding="utf-8"?>’; …
I’m now working with eGw 1.6 with still the same development but I can’t access it (function xml/RPC located in addressbook.boaddressbook)
Are there any changes.
Thanks for your help.