$identification */ //login $identification = array ( 'utilisateur' => 'username', //User 'motDePasse' => 'password' //Password ); //Main order information /* All three of those values are optional. Dates must be provided as an unix timestamp or an ISO 8601-compliant date. timestampChangementDepuis: Date from which we want to retrieve changes timestampChangementJusqua: Date until which we want to retrieve changes typeDate: Date type iso (iso8601) or timestamp (unix time, default choice if omitted) */ //Making the final array $status = array ( 'identification' => $identification, 'timestampChangementDepuis' => '1466373600', 'timestampChangementJusqua' => '1497909600', 'typeDate' => 'timestamp' ); /** XML-RPC **/ //vars $RpcType = array ( 'dureeVie' => 'int', 'nbLicence' => 'int', 'keySize' => 'int', 'typeDemande' => 'int', 'civiliteAdm' => 'int', 'civiliteTech' => 'int', 'civiliteRespLegal' => 'int' ); $rpcValues = array(); //Functions //Converts our arrays into RPC-ready data, uses recursivity for structures. function tab2rpc($tab) { $tabReturn = false; if ($tab && is_array($tab)) { $tabReturn = array(); while (list($key,$val) = each($tab)) { if ($val && is_array($val)) { $tabReturn[$key]=new xmlrpcval(tab2rpc($val), "struct"); }else{ if (isset($RpcType[$key])) $type = $RpcType[$key]; else $type = "string"; $tabReturn[$key]=new xmlrpcval($val, $type); } } } return $tabReturn; } //Creating the value array $rpcValues = tab2rpc($status); //Creating the message $message = new xmlrpcmsg('statut'); //This value varies depending on the type of operation $message->addParam(new xmlrpcval($rpcValues,"struct")); //Client configuration $client = new xmlrpc_client($appli, $serveur, $port); $client->setSSLVerifyPeer(false); $client->setSSLVerifyHost(false); $client->setDebug(2); //Sending the request and getting the response $reponse = $client->send($message,0,$transport); $valeur = $reponse->value(); //Trace display if(!$reponse->faultCode()) { $msig = php_xmlrpc_decode($valeur); echo "
".nl2br(print_r($msig,true))."
"; echo '
'; foreach($msig AS $l => $table) echo ''; echo '
'.$l.' '.$table['codeReponse'].' '.$table['messageReponse'].'
'; } else{ echo "Erreur:

Code: ".$reponse->faultCode()."
Message : ".$reponse->faultString()."

"; echo "
reponse :
".print_r($reponse, true)."

\n"; }