Retrieve the remaining credit on your account
Recup_Credit
int Recup_Credit ( login, motdepasse )
Description
Retrieve the number of credits remaining on the account identified by login and password.
Parameters (required)
login: customer ID (nichandle)
motdepasse: the password
Return value
The number of credits remaining, or an error message.
Error messages
No field must be left empty login. No field must be left empty motdepasse. Authentication error (invalid login / password).
Example with NuSOAP
include('nusoap/nusoap.php');
$client = new soapclient('http://www.mdworks.info/_soap/control.php');
$parametres = array( 'login'=>'your_login', 'motdepasse'=>'your_password' );
$variable=$client->call('Recup_Credit', $parametres);
// Retrieve the error, if any
if($client->fault) die("Error:Code: {$client->faultcode}
" . "Detail: {$client->faultactor}
" . "Solution: {$client->faultstring}
");
echo 'Quota:'.$variable.'
';Example with PHP5
try { $client = new SoapClient(null, array('location' => "https://www.eml-srv.com/_soap/control.php",
'uri' => "https://www.eml-srv.com",'encoding'=>'ISO-8859-1' ));
$variable = $client->Recup_Credit('your_login','your_password'); //or //$variable = $client->__soapCall(Recup_Credit,$parametres);
print_r($variable); } catch (SoapFault $fault) {
trigger_error("SOAP Fault: (faultcode: {$fault->faultcode}, faultstring: {$fault->faultstring})", E_USER_ERROR);
}Last updated on