Retrieve campaign parameters
Recup_Parametres_Campagne
int Recup_Parametres_Campagne (id_campagne, login, password)
Description
Retrieve the parameters of a campaign.
Parameters (required)
login: customer ID (nichandle)
motdepasse: the password
id_campagne: campaign identifier
Return value
An array containing the campaign parameters:
- [id] => campaign identifier
- [reference] => campaign reference (for your own use)
- [date_creation] => unix timestamp
- [date_envoi] => unix timestamp or
Non envoyée - [return_path] => Return path and From
- [gestion_npai] => 0
- [nom_expediteur] => Ediware
- [reply] => reply address
- [objet] => message subject
- [total_mail] => number of emails in the campaign database
- [images_jointes] => 0 if images are downloaded from a server, 1 if images are embedded in the email
- [lien_desinscription] => 0 if you manage the unsubscribe link yourself, 1 if it is managed by MDWorks
- [passphrase] => the password associated with the campaign, required to display its statistics page
Error messages
No field must be left empty login
No field must be left empty motdepasse
Authentication error (invalid login / password)
This campaign does not appear to belong to you
Example with NuSOAP
include('nusoap/nusoap.php');
$client = new soapclient('http://www.mdworks.info/_soap/control.php');
$parametres = array( 'id_campagne'=>'campaign id' 'login'=>'your_login', 'motdepasse'=>'your_password' );
$variable=$client->call('Recup_Parametres_Campagne', $parametres);
// Retrieve the error, if any
if($client->fault) die("Error:Code: {$client->faultcode}
" . "Detail: {$client->faultactor}
" . "Solution: {$client->faultstring}
");
echo 'Response:'.$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_Parametres_Campagne('id_campagne','your_login','your_password'); //or //$variable = $client->__soapCall(Recup_Parametres_Campagne,$parametres);
print_r($variable); } catch (SoapFault $fault) {
trigger_error("SOAP Fault: (faultcode: {$fault->faultcode}, faultstring: {$fault->faultstring})", E_USER_ERROR);
}Last updated on