<?php
try {
// Create a new client by providing the endpoint to the constructor.
$client = new SoapClient(
null,
[
'location' => 'https://api.sedo.com/api/v1/',
'soap_version' => SOAP_1_1,
'encoding' => 'UTF-8',
'uri' => 'urn:SedoInterface',
'style' => SOAP_RPC,
'use' => SOAP_ENCODED,
]
);
// Set the values for the array
$params = [
'partnerid' => 1234,
'signkey' => 'abcdefghijklmnopqrstuvwxyz0123456789',
'username' => 'johndoe',
'password' => 'secret',
'templateentry' => [
[
'domain' => 'example.com',
],
[
'domain' => 'example.net',
],
]
];
// Call the SOAP method
$result = $client->ResetTemplate($params);
// Display the result
echo "<table>";
echo "<tr>";
echo "<td>Domain</td>";
echo "<td>Template</td>";
echo "<td>Status</td>";
echo "<td>Message</td>";
echo "</tr>";
for ($i = 0; $i < count($result); $i++) {
echo "<tr>";
echo "<td>" . $result[$i]['domain'] . "</td>";
echo "<td>" . $result[$i]['template'] . "</td>";
echo "<td>" . $result[$i]['status'] . "</td>";
echo "<td>" . $result[$i]['message'] . "</td>";
echo "</tr>";
}
echo "</table>";
} catch (SoapFault $e) {
echo 'Error: '.$e->getMessage();
}