commit | author | age
|
413d3b
|
1 |
<?php |
T |
2 |
|
b1a6a5
|
3 |
require 'soap_config.php'; |
413d3b
|
4 |
|
T |
5 |
|
|
6 |
$client = new SoapClient(null, array('location' => $soap_location, |
b1a6a5
|
7 |
'uri' => $soap_uri, |
MC |
8 |
'trace' => 1, |
|
9 |
'exceptions' => 1)); |
413d3b
|
10 |
|
T |
11 |
|
|
12 |
try { |
b1a6a5
|
13 |
if($session_id = $client->login($username, $password)) { |
413d3b
|
14 |
echo 'Logged successfull. Session ID:'.$session_id.'<br />'; |
T |
15 |
} |
|
16 |
|
|
17 |
//* Parameters |
|
18 |
$blacklist_id = 7; |
|
19 |
$client_id = 1; |
|
20 |
|
|
21 |
|
|
22 |
//* Get the mail blacklist record |
|
23 |
$mail_blacklist_record = $client->mail_blacklist_get($session_id, $blacklist_id); |
|
24 |
|
|
25 |
//* Change the status to inactive |
|
26 |
$mail_blacklist_record['active'] = 'n'; |
b1a6a5
|
27 |
|
413d3b
|
28 |
$affected_rows = $client->mail_blacklist_update($session_id, $client_id, $blacklist_id, $mail_blacklist_record); |
T |
29 |
|
|
30 |
echo "Number of records that have been changed in the database: ".$affected_rows."<br>"; |
b1a6a5
|
31 |
|
413d3b
|
32 |
if($client->logout($session_id)) { |
T |
33 |
echo 'Logged out.<br />'; |
|
34 |
} |
b1a6a5
|
35 |
|
MC |
36 |
|
413d3b
|
37 |
} catch (SoapFault $e) { |
T |
38 |
echo $client->__getLastResponse(); |
|
39 |
die('SOAP Error: '.$e->getMessage()); |
|
40 |
} |
|
41 |
|
|
42 |
?> |