Service Provider API DomainCountries

Synopsis
public array DomainCountries()
Description

To help you select the correct ISO codes for the country in the API functions, we offer you the possibility to take a look at the countries allowed by our system. We've put all the countries allowed by our system in an XML feed with descriptions in two languages:

XML
This function can be called using GET / POST requests.
Parameters
Type Parameter Mandatory Description
string lan yes Language.
  • en - English
  • de - German
Version
1.0
<?php
/* URL to Sedo's API */
$baseUrl = 'https://api.sedo.com/api/v1/DomainCountries?';

/* API function parameters */
$params = [
    'output_method' => 'xml',
    'lan'           => 'en',
];

/* 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 the following format:

<?xml version="1.0" encoding="UTF-8"?>
<SEDODOMAINCOUNTRIES ver="1.0">
    <country iso="AF">Afghanistan</country>
    <country iso="AL">Albania</country>
    <country iso="DZ">Algeria</country>
    <country iso="AS">American Somoa</country>
    <country iso="AD">Andorra</country>
    <country iso="AO">Angola</country>
    <country iso="AI">Anguilla</country>
    <country iso="AQ">Antarctica</country>
    ⋮
    <country iso="TK">Tokelau</country>
    <country iso="AC">Ascension Island</country>
    <country iso="GM">Gambia</country>
    <country iso="GW">Guinea-Bissau</country>
    <country iso="GB-">Isle of Man</country>
    <country iso="MG">Madagascar</country>
    <country iso="MV">Maldives</country>
    <country iso="PS">Palestinian Territories</country>
    <country iso="TG">Togo</country>
</SEDODOMAINCOUNTRIES>