Retrieve campaign statistics
Retrieve the statistics of a campaign
array Recup_Statistiques_Campagne( id_campagne, login, motdepasse)
Description
Retrieve an array of key/value pairs corresponding to the campaign’s statistics.
Parameters (required)
login: customer ID (nichandle)
motdepasse: the password
id_campagne: the campaign identifier.
Return value
true
Error messages
No field must be left empty login
No field must be left empty motdepasse
No field must be left empty email
This campaign does not appear to belong to you.
Example with NuSOAP
include('nusoap/nusoap.php');
$client = new soapclient('https://www.eml-srv.com/_soap/control.php'); // Remove the 's' from 'https' if CURL is not installed
$parametres = array( 'id_campagne'=>'12345', 'login'=>'your_login', 'motdepasse'=>'your_password', 'email'=>'test@test.com' );
$variable=$client->call('Recup_Statistiques_Campagne', $parametres);
// Retrieve the error, if any
if($client->fault)
die("Error:Code: {$client->faultcode}"
. "Detail: {$client->faultactor}"
. "Solution: {$client->faultstring}");
print_r($variable);Which gives a result like:
array(1) {
[0]=>
array(9) {
["envois"]=>
string(4) "1652"
["aboutis"]=>
string(4) "1570"
["ouvertures_uniques"]=>
string(3) "381"
["ouvertures_bruts"]=>
string(3) "999"
["clics_uniques"]=>
string(2) "32"
["clics_bruts"]=>
string(2) "41"
["npai_hard"]=>
string(2) "76"
["overquota"]=>
string(1) "6"
["desinscrits"]=>
string(2) "17"
["npai_soft"]=>
string(1) "3"
["bounces"]=>
string(2) "13"
}
}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_Statistiques_Campagne('id_campagne', 'your_login','your_password'); //or //$variable = $client->__soapCall(Recup_Statistiques_Campagne,$parametres);
print_r($variable); } catch (SoapFault $fault) {
trigger_error("SOAP Fault: (faultcode: {$fault->faultcode}, faultstring: {$fault->faultstring})", E_USER_ERROR);
}Last updated on