Verbindungs- und Sicherheitsschlüssel
$url = 'https://chamilo.net/main/webservices/';
$soap = new SoapClient($url . 'registration.soap.php?wsdl');
// get your own IP as seen by the Chamilo server (helps building the key)
$myIp = file_get_contents($url . 'testip.php') ;
// use the security_key as defined in your app/config/configuration.php
$key = '23534f3223a3cb234234324208';
// now we can build the key we need
$finalKey = sha1($myIp.$key) ;
// prepare the user details
$params = array(
'secret_key' => $finalKey,
'firstname' => 'Yannick',
'lastname' => 'Warnier',
'status' => 5,
'loginname' => 'ywarnier',
'password' => '243fvsdfvs6dfv657dfvs32dfvs34dfv',
'encrypt_method' => 'sha1',
'email' => '[email protected]',
'language' => 'spanish',
'phone' => '',
'expiration_date' => '2015-01-01',
'original_user_id_name' => 'external_user_id',
'original_user_id_value' => 34,
'official_code' => 34,
'extra' => array()
);
// finally, we can call the service
$soap->WSCreateUserPasswordCrypted($params);Zuletzt aktualisiert
War das hilfreich?