public array DomainListExtended( array $listdomains )
Returns all domains in a customer account.
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) |
integer | $startfrom | no | Start position. |
integer | $results | no | Maximum number of results to return. (max. 100 per SOAP request) |
integer | $orderby | no |
Which property to order the results by:
|
string[] | $domain | no | Array of domain names in ACE format to filter for. (max. 100 per SOAP request) |
Type | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
array |
Array of domain records with the following properties:
|
<?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',
'startfrom' => 0,
'results' => 100,
'orderby' => 0,
'domain' => ['example.com', 'example.net'],
];
// Call the SOAP method
$result = $client->DomainListExtended($params);
// Display the result
echo "<table>";
echo "<tr>";
echo "<td>Domain</td>";
echo "<td>Category1</td>";
echo "<td>Category2</td>";
echo "<td>Category3</td>";
echo "<td>For sale</td>";
echo "<td>Price</td>";
echo "<td>Minprice</td>";
echo "<td>Fixedprice</td>";
echo "<td>Currency</td>";
echo "<td>Domainlanguage</td>";
echo "<td>Masterkeywords</td>";
echo "<td>Inserted</td>";
echo "<td>Earningscomplete</td>";
echo "</tr>";
for($i = 0; $i<count($result); $i++)
{
echo "<tr>";
echo "<td>".$result[$i]['domain']."</td>";
echo "<td>".$result[$i]['category'][0]."</td>";
echo "<td>".$result[$i]['category'][1]."</td>";
echo "<td>".$result[$i]['category'][2]."</td>";
echo "<td>".$result[$i]['forsale']."</td>";
echo "<td>".$result[$i]['price']."</td>";
echo "<td>".$result[$i]['minprice']."</td>";
echo "<td>".$result[$i]['fixedprice']."</td>";
echo "<td>".$result[$i]['currency']."</td>";
echo "<td>".$result[$i]['domainlanguage']."</td>";
echo "<td>";
echo "<pre>";
print_r($result[$i]['keywords']);
echo "</pre>";
echo "</td>";
echo "</tr>";
}
echo "</table>";
} catch (SoapFault $e) {
echo 'Error: '.$e->getMessage();
}
<?php
/* URL to Sedo's API */
$baseUrl = 'https://api.sedo.com/api/v1/DomainListExtended?';
/* API function parameters */
$params = [
'partnerid' => 1234,
'signkey' => 'abcdefghijklmnopqrstuvwxyz0123456789',
'username' => 'johndoe',
'password' => 'secret',
'output_method' => 'xml',
'startfrom' => 0,
'results' => 100,
'orderby' => 0,
'domain' => ['example.com', 'example.net'],
];
/* build request URL */
$request = $baseUrl . http_build_query($params);
/* fire API request */
$fp = @fopen($request, 'r');
/* read response line by line */
while (!@feof($fp)) {
echo fread($fp, 4096);
}
/* close the connection */
fclose($fp);
For a successful request, you will receive an XML document as response in this format:
<?xml version="1.0" encoding="UTF-8"?>
<SEDODOMAINLIST ver="1.0">
<item>
<domain type="xsd:string">example.com</domain>
<category>
<cat1 type="xsd:int">1</cat1>
<cat2 type="xsd:int">2</cat2>
<cat3 type="xsd:int">3</cat3>
</category>
<forsale type="xsd:int">1</forsale>
<price type="xsd:double">99.99</price>
<minprice type="xsd:double">0.00</minprice>
<fixedprice type="xsd:int">1</fixedprice>
<currency type="xsd:int">1</currency>
<domainlanguage type="xsd:string">en</domainlanguage>
<keywords type="xsd:string">
<keyword>
<keyword>Keyword</keyword>
<market>xyz</market>
<advertiser>0</advertiser>
<views>0</views>
<clicks>0</clicks>
<earnings>0</earnings>
<rpm>0</rpm>
<inserted>2012-12-04 15:16:27</inserted>
</keyword>
</keywords>
<inserted type="xsd:string">989704800</inserted>
<earningscomplete type="xsd:double">0.94</earningscomplete>
</item>
<item>
<domain type="xsd:string">example.net</domain>
<category>
<cat1 type="xsd:int">1</cat1>
<cat2 type="xsd:int">2</cat2>
<cat3 type="xsd:int">3</cat3>
</category>
<forsale type="xsd:int">1</forsale>
<price type="xsd:double">99.99</price>
<minprice type="xsd:double">0.00</minprice>
<fixedprice type="xsd:int">1</fixedprice>
<currency type="xsd:int">1</currency>
<domainlanguage type="xsd:string">en</domainlanguage>
<keywords type="xsd:string">
<keyword>
<keyword>Keyword</keyword>
<market>xyz</market>
<advertiser>0</advertiser>
<views>0</views>
<clicks>0</clicks>
<earnings>0</earnings>
<rpm>0</rpm>
<inserted>2012-12-04 15:16:27</inserted>
</keyword>
</keywords>
<inserted type="xsd:string">989704800</inserted>
<earningscomplete type="xsd:double">0.94</earningscomplete>
</item>
</SEDODOMAINLIST>
For an unsuccessful request, you will receive an XML document as response in this format:
<?xml version="1.0" encoding="UTF-8"?>
<SEDOFAULT ver="1.0">
<faultcode type="xsd:string">Exxx</faultcode>
<faultstring type="xsd:string">xxxxxx</faultstring>
</SEDOFAULT>