public array SetRelatedLinks( array $entries )
Used to set related links for one domain for one market.
Note: The related links will be displayed in the same order in which you send them to us. You are able to replace a related link by adding a keyword in the appropriate position. If you would like to delete a related link, you should leave the string empty in the corresponding position - this will then be filled with a related link automatically chosen.
Limitations: Due to limitations introduced by our advertising partners, we can not guarantee that related links set via this function are always respected. Advertisers may replace some or all of the related links at their discretion.
Type | Parameter | Mandatory | Description |
---|---|---|---|
integer | $partnerid | yes | Partner ID. |
string | $signkey | yes | Sign key. |
string | $username | yes | User name. (max. 25 characters) |
string | $password | yes | Password. (max. 16 characters) |
string | $domain | yes | Domain name in ACE format. |
string | $market | yes | Targeted market for the keyword. See Sedo Keyword Markets . |
string[] | $relatedlinksdata | yes |
Array of keywords strings in UTF-8 encoding. (max. 10 keywords) |
Type | Description | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
array |
The array returned by the function references all keywords used in the request. The return value contains the following elements:
|
<?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',
'domain' => 'example.com',
'market' => 'eng',
'relatedlinksdata' => ['Cars', 'House', 'Internet', …],
];
// Call the SOAP method
$result = $client->SetRelatedLinks($params);
// Display the result
while (list ($key, $val) = each($result)) {
echo "$key => $val<br />\n";
}
} catch (SoapFault $e) {
echo 'Error: '.$e->getMessage();
}