Child pages
  • WHM API 1 Functions - get_countries_with_known_ip_ranges
Skip to end of metadata
Go to start of metadata

Description

This function lists the country codes available for whitelist and blacklist functions.

Examples 


 JSON API
https://hostname.example.com:2087/cpsess##########/json-api/get_countries_with_known_ip_ranges?api.version=1
 XML API
https://hostname.example.com:2087/cpsess##########/xml-api/get_countries_with_known_ip_ranges?api.version=1
 Command Line
whmapi1 get_countries_with_known_ip_ranges


Notes:

  • You must URI-encode values.
  • For more information and additional output options, read our Guide to WHM API 1 documentation or run the whmapi1 --help command.
  • If you run CloudLinux™, you must use the full path of the whmapi1 command:

    /usr/local/cpanel/bin/whmapi1

 Output (JSON)
{  
   "metadata":{  
      "reason":"OK",
      "command":"get_countries_with_known_ip_ranges",
      "version":1,
      "result":1
   },
   "data":{  
      "countries":[  
         {  
            "name":"Andorra",
            "code":"AD"
         },
         {  
            "name":"United Arab Emirates",
            "code":"AE"
         },
         {  
            "name":"Afghanistan",
            "code":"AF"
         },
         {  
            "code":"AG",
            "name":"Antigua and Barbuda"
         },
         {  
            "name":"Anguilla",
            "code":"AI"
         },
         {  
            "code":"AL",
            "name":"Albania"
         },
         {  
            "name":"Armenia",
            "code":"AM"
         },
         {  
            "name":"Angola",
            "code":"AO"
         },
         {  
            "name":"Argentina",
            "code":"AR"
         },
         {  
            "name":"American Samoa",
            "code":"AS"
         },
         {  
            "name":"Austria",
            "code":"AT"
         },
         {  
            "code":"AU",
            "name":"Australia"
         },
         {  
            "code":"AW",
            "name":"Aruba"
         },
         {  
            "code":"AX",
            "name":"Åland Islands"
         },
         {  
            "code":"AZ",
            "name":"Azerbaijan"
         },
         {  
            "name":"Bosnia and Herzegovina",
            "code":"BA"
         },
         {  
            "code":"BB",
            "name":"Barbados"
         },
         {  
            "code":"BD",
            "name":"Bangladesh"
         },
         {  
            "code":"BE",
            "name":"Belgium"
         },
         {  
            "name":"Burkina Faso",
            "code":"BF"
         },
         {  
            "code":"BG",
            "name":"Bulgaria"
         },
         {  
            "code":"BH",
            "name":"Bahrain"
         },
         {  
            "code":"BI",
            "name":"Burundi"
         },
         {  
            "name":"Benin",
            "code":"BJ"
         },
         {  
            "name":"Bermuda",
            "code":"BM"
         },
         {  
            "code":"BN",
            "name":"Brunei"
         },
         {  
            "code":"BO",
            "name":"Bolivia"
         },
         {  
            "name":"British Antarctic Territory",
            "code":"BQ"
         },
         {  
            "name":"Brazil",
            "code":"BR"
         },
         {  
            "code":"BS",
            "name":"Bahamas"
         },
         {  
            "code":"BT",
            "name":"Bhutan"
         },
         {  
            "name":"Botswana",
            "code":"BW"
         },
         {  
            "code":"BY",
            "name":"Belarus"
         },
         {  
            "code":"BZ",
            "name":"Belize"
         },
         {  
            "name":"Canada",
            "code":"CA"
         },
         {  
            "code":"CD",
            "name":"Congo [DRC]"
         },
         {  
            "name":"Central African Republic",
            "code":"CF"
         },
         {  
            "name":"Congo [Republic]",
            "code":"CG"
         },
         {  
            "name":"Switzerland",
            "code":"CH"
         },
         {  
            "name":"Ivory Coast",
            "code":"CI"
         },
         {  
            "name":"Cook Islands",
            "code":"CK"
         },
         {  
            "code":"CL",
            "name":"Chile"
         },
         {  
            "code":"CM",
            "name":"Cameroon"
         },
         {  
            "name":"China",
            "code":"CN"
         },
         {  
            "name":"Colombia",
            "code":"CO"
         },
         {  
            "name":"Costa Rica",
            "code":"CR"
         },
         {  
            "name":"Cuba",
            "code":"CU"
         },
         {  
            "code":"CV",
            "name":"Cape Verde"
         },
         {  
            "name":"Curaçao",
            "code":"CW"
         },
         {  
            "name":"Cyprus",
            "code":"CY"
         },
         {  
            "name":"Czech Republic",
            "code":"CZ"
         },
         {  
            "code":"DE",
            "name":"Germany"
         },
         {  
            "code":"DJ",
            "name":"Djibouti"
         },
         {  
            "name":"Denmark",
            "code":"DK"
         },
         {  
            "code":"DM",
            "name":"Dominica"
         },
         {  
            "name":"Dominican Republic",
            "code":"DO"
         },
         {  
            "name":"Algeria",
            "code":"DZ"
         },
         {  
            "name":"Ecuador",
            "code":"EC"
         },
         {  
            "code":"EE",
            "name":"Estonia"
         },
         {  
            "name":"Egypt",
            "code":"EG"
         },
         {  
            "code":"ER",
            "name":"Eritrea"
         },
         {  
            "name":"Spain",
            "code":"ES"
         },
         {  
            "code":"ET",
            "name":"Ethiopia"
         },
         {  
            "code":"EU",
            "name":"European Union"
         },
         {  
            "name":"Finland",
            "code":"FI"
         },
         {  
            "code":"FJ",
            "name":"Fiji"
         },
         {  
            "name":"Micronesia",
            "code":"FM"
         },
         {  
            "code":"FO",
            "name":"Faroe Islands"
         },
         {  
            "code":"FR",
            "name":"France"
         },
         {  
            "name":"Gabon",
            "code":"GA"
         },
         {  
            "name":"United Kingdom",
            "code":"GB"
         },
         {  
            "code":"GD",
            "name":"Grenada"
         },
         {  
            "name":"Georgia",
            "code":"GE"
         },
         {  
            "name":"French Guiana",
            "code":"GF"
         },
         {  
            "name":"Guernsey",
            "code":"GG"
         },
         {  
            "code":"GH",
            "name":"Ghana"
         },
         {  
            "code":"GI",
            "name":"Gibraltar"
         },
         {  
            "code":"GL",
            "name":"Greenland"
         },
         {  
            "code":"GM",
            "name":"Gambia"
         },
         {  
            "code":"GN",
            "name":"Guinea"
         },
         {  
            "name":"Guadeloupe",
            "code":"GP"
         },
         {  
            "name":"Equatorial Guinea",
            "code":"GQ"
         },
         {  
            "name":"Greece",
            "code":"GR"
         },
         {  
            "code":"GT",
            "name":"Guatemala"
         },
         {  
            "name":"Guam",
            "code":"GU"
         },
         {  
            "code":"GW",
            "name":"Guinea-Bissau"
         },
         {  
            "code":"GY",
            "name":"Guyana"
         },
         {  
            "name":"Hong Kong",
            "code":"HK"
         },
         {  
            "name":"Honduras",
            "code":"HN"
         },
         {  
            "name":"Croatia",
            "code":"HR"
         },
         {  
            "name":"Haiti",
            "code":"HT"
         },
         {  
            "code":"HU",
            "name":"Hungary"
         },
         {  
            "code":"ID",
            "name":"Indonesia"
         },
         {  
            "code":"IE",
            "name":"Ireland"
         },
         {  
            "name":"Israel",
            "code":"IL"
         },
         {  
            "name":"Isle of Man",
            "code":"IM"
         },
         {  
            "code":"IN",
            "name":"India"
         },
         {  
            "code":"IO",
            "name":"British Indian Ocean Territory"
         },
         {  
            "code":"IQ",
            "name":"Iraq"
         },
         {  
            "name":"Iran",
            "code":"IR"
         },
         {  
            "name":"Iceland",
            "code":"IS"
         },
         {  
            "code":"IT",
            "name":"Italy"
         },
         {  
            "code":"JE",
            "name":"Jersey"
         },
         {  
            "code":"JM",
            "name":"Jamaica"
         },
         {  
            "name":"Jordan",
            "code":"JO"
         },
         {  
            "code":"JP",
            "name":"Japan"
         },
         {  
            "name":"Kenya",
            "code":"KE"
         },
         {  
            "code":"KG",
            "name":"Kyrgyzstan"
         },
         {  
            "name":"Cambodia",
            "code":"KH"
         },
         {  
            "name":"Kiribati",
            "code":"KI"
         },
         {  
            "name":"Comoros",
            "code":"KM"
         },
         {  
            "code":"KN",
            "name":"Saint Kitts and Nevis"
         },
         {  
            "code":"KP",
            "name":"North Korea"
         },
         {  
            "name":"South Korea",
            "code":"KR"
         },
         {  
            "code":"KW",
            "name":"Kuwait"
         },
         {  
            "code":"KY",
            "name":"Cayman Islands"
         },
         {  
            "name":"Kazakhstan",
            "code":"KZ"
         },
         {  
            "code":"LA",
            "name":"Laos"
         },
         {  
            "name":"Lebanon",
            "code":"LB"
         },
         {  
            "name":"Saint Lucia",
            "code":"LC"
         },
         {  
            "name":"Liechtenstein",
            "code":"LI"
         },
         {  
            "code":"LK",
            "name":"Sri Lanka"
         },
         {  
            "code":"LR",
            "name":"Liberia"
         },
         {  
            "name":"Lesotho",
            "code":"LS"
         },
         {  
            "name":"Lithuania",
            "code":"LT"
         },
         {  
            "name":"Luxembourg",
            "code":"LU"
         },
         {  
            "name":"Latvia",
            "code":"LV"
         },
         {  
            "code":"LY",
            "name":"Libya"
         },
         {  
            "code":"MA",
            "name":"Morocco"
         },
         {  
            "name":"Monaco",
            "code":"MC"
         },
         {  
            "code":"MD",
            "name":"Moldova"
         },
         {  
            "code":"ME",
            "name":"Montenegro"
         },
         {  
            "name":"Saint Martin",
            "code":"MF"
         },
         {  
            "code":"MG",
            "name":"Madagascar"
         },
         {  
            "name":"Marshall Islands",
            "code":"MH"
         },
         {  
            "name":"Macedonia [FYROM]",
            "code":"MK"
         },
         {  
            "name":"Mali",
            "code":"ML"
         },
         {  
            "name":"Myanmar [Burma]",
            "code":"MM"
         },
         {  
            "code":"MN",
            "name":"Mongolia"
         },
         {  
            "code":"MO",
            "name":"Macau"
         },
         {  
            "name":"Northern Mariana Islands",
            "code":"MP"
         },
         {  
            "name":"Martinique",
            "code":"MQ"
         },
         {  
            "code":"MR",
            "name":"Mauritania"
         },
         {  
            "code":"MS",
            "name":"Montserrat"
         },
         {  
            "code":"MT",
            "name":"Malta"
         },
         {  
            "code":"MU",
            "name":"Mauritius"
         },
         {  
            "code":"MV",
            "name":"Maldives"
         },
         {  
            "code":"MW",
            "name":"Malawi"
         },
         {  
            "code":"MX",
            "name":"Mexico"
         },
         {  
            "code":"MY",
            "name":"Malaysia"
         },
         {  
            "code":"MZ",
            "name":"Mozambique"
         },
         {  
            "name":"Namibia",
            "code":"NA"
         },
         {  
            "code":"NC",
            "name":"New Caledonia"
         },
         {  
            "code":"NE",
            "name":"Niger"
         },
         {  
            "name":"Norfolk Island",
            "code":"NF"
         },
         {  
            "code":"NG",
            "name":"Nigeria"
         },
         {  
            "name":"Nicaragua",
            "code":"NI"
         },
         {  
            "code":"NL",
            "name":"Netherlands"
         },
         {  
            "code":"NO",
            "name":"Norway"
         },
         {  
            "name":"Nepal",
            "code":"NP"
         },
         {  
            "code":"NR",
            "name":"Nauru"
         },
         {  
            "code":"NU",
            "name":"Niue"
         },
         {  
            "name":"New Zealand",
            "code":"NZ"
         },
         {  
            "name":"Oman",
            "code":"OM"
         },
         {  
            "code":"PA",
            "name":"Panama"
         },
         {  
            "code":"PE",
            "name":"Peru"
         },
         {  
            "code":"PF",
            "name":"French Polynesia"
         },
         {  
            "code":"PG",
            "name":"Papua New Guinea"
         },
         {  
            "name":"Philippines",
            "code":"PH"
         },
         {  
            "code":"PK",
            "name":"Pakistan"
         },
         {  
            "code":"PL",
            "name":"Poland"
         },
         {  
            "code":"PM",
            "name":"Saint Pierre and Miquelon"
         },
         {  
            "code":"PR",
            "name":"Puerto Rico"
         },
         {  
            "name":"Palestinian Territories",
            "code":"PS"
         },
         {  
            "name":"Portugal",
            "code":"PT"
         },
         {  
            "name":"Palau",
            "code":"PW"
         },
         {  
            "code":"PY",
            "name":"Paraguay"
         },
         {  
            "name":"Qatar",
            "code":"QA"
         },
         {  
            "name":"Réunion",
            "code":"RE"
         },
         {  
            "code":"RO",
            "name":"Romania"
         },
         {  
            "code":"RS",
            "name":"Serbia"
         },
         {  
            "code":"RU",
            "name":"Russia"
         },
         {  
            "code":"RW",
            "name":"Rwanda"
         },
         {  
            "name":"Saudi Arabia",
            "code":"SA"
         },
         {  
            "name":"Solomon Islands",
            "code":"SB"
         },
         {  
            "code":"SC",
            "name":"Seychelles"
         },
         {  
            "name":"Sudan",
            "code":"SD"
         },
         {  
            "code":"SE",
            "name":"Sweden"
         },
         {  
            "name":"Singapore",
            "code":"SG"
         },
         {  
            "name":"Slovenia",
            "code":"SI"
         },
         {  
            "code":"SK",
            "name":"Slovakia"
         },
         {  
            "code":"SL",
            "name":"Sierra Leone"
         },
         {  
            "code":"SM",
            "name":"San Marino"
         },
         {  
            "code":"SN",
            "name":"Senegal"
         },
         {  
            "code":"SO",
            "name":"Somalia"
         },
         {  
            "name":"Suriname",
            "code":"SR"
         },
         {  
            "name":"South Sudan",
            "code":"SS"
         },
         {  
            "name":"São Tomé and Príncipe",
            "code":"ST"
         },
         {  
            "name":"El Salvador",
            "code":"SV"
         },
         {  
            "name":"Sint Maarten",
            "code":"SX"
         },
         {  
            "name":"Syria",
            "code":"SY"
         },
         {  
            "code":"SZ",
            "name":"Swaziland"
         },
         {  
            "code":"TC",
            "name":"Turks and Caicos Islands"
         },
         {  
            "code":"TD",
            "name":"Chad"
         },
         {  
            "code":"TG",
            "name":"Togo"
         },
         {  
            "code":"TH",
            "name":"Thailand"
         },
         {  
            "name":"Tajikistan",
            "code":"TJ"
         },
         {  
            "name":"Tokelau",
            "code":"TK"
         },
         {  
            "code":"TL",
            "name":"East Timor"
         },
         {  
            "name":"Turkmenistan",
            "code":"TM"
         },
         {  
            "code":"TN",
            "name":"Tunisia"
         },
         {  
            "name":"Tonga",
            "code":"TO"
         },
         {  
            "code":"TR",
            "name":"Turkey"
         },
         {  
            "name":"Trinidad and Tobago",
            "code":"TT"
         },
         {  
            "code":"TV",
            "name":"Tuvalu"
         },
         {  
            "code":"TW",
            "name":"Taiwan"
         },
         {  
            "code":"TZ",
            "name":"Tanzania"
         },
         {  
            "code":"UA",
            "name":"Ukraine"
         },
         {  
            "name":"Uganda",
            "code":"UG"
         },
         {  
            "code":"US",
            "name":"United States"
         },
         {  
            "name":"Uruguay",
            "code":"UY"
         },
         {  
            "name":"Uzbekistan",
            "code":"UZ"
         },
         {  
            "name":"Vatican City",
            "code":"VA"
         },
         {  
            "name":"Saint Vincent and the Grenadines",
            "code":"VC"
         },
         {  
            "code":"VE",
            "name":"Venezuela"
         },
         {  
            "name":"British Virgin Islands",
            "code":"VG"
         },
         {  
            "name":"U.S. Virgin Islands",
            "code":"VI"
         },
         {  
            "name":"Vietnam",
            "code":"VN"
         },
         {  
            "code":"VU",
            "name":"Vanuatu"
         },
         {  
            "name":"Wallis and Futuna",
            "code":"WF"
         },
         {  
            "name":"Samoa",
            "code":"WS"
         },
         {  
            "code":"YE",
            "name":"Yemen"
         },
         {  
            "name":"Mayotte",
            "code":"YT"
         },
         {  
            "code":"ZA",
            "name":"South Africa"
         },
         {  
            "code":"ZM",
            "name":"Zambia"
         },
         {  
            "name":"Zimbabwe",
            "code":"ZW"
         },
         {  
            "name":"Unknown Region",
            "code":"ZZ"
         }
      ]
   }
}
 Output (XML)
<result>
	<metadata>
		<reason>OK</reason>
		<command>get_countries_with_known_ip_ranges</command>
		<version>1</version>
		<result>1</result>
	</metadata>
	<data>
		<countries>
			<name>Andorra</name>
			<code>AD</code>
		</countries>
		<countries>
			<name>United Arab Emirates</name>
			<code>AE</code>
		</countries>
		<countries>
			<name>Afghanistan</name>
			<code>AF</code>
		</countries>
		<countries>
			<code>AG</code>
			<name>Antigua and Barbuda</name>
		</countries>
		<countries>
			<name>Anguilla</name>
			<code>AI</code>
		</countries>
		<countries>
			<code>AL</code>
			<name>Albania</name>
		</countries>
		<countries>
			<name>Armenia</name>
			<code>AM</code>
		</countries>
		<countries>
			<name>Angola</name>
			<code>AO</code>
		</countries>
		<countries>
			<name>Argentina</name>
			<code>AR</code>
		</countries>
		<countries>
			<name>American Samoa</name>
			<code>AS</code>
		</countries>
		<countries>
			<name>Austria</name>
			<code>AT</code>
		</countries>
		<countries>
			<code>AU</code>
			<name>Australia</name>
		</countries>
		<countries>
			<code>AW</code>
			<name>Aruba</name>
		</countries>
		<countries>
			<code>AX</code>
			<name>Åland Islands</name>
		</countries>
		<countries>
			<code>AZ</code>
			<name>Azerbaijan</name>
		</countries>
		<countries>
			<name>Bosnia and Herzegovina</name>
			<code>BA</code>
		</countries>
		<countries>
			<code>BB</code>
			<name>Barbados</name>
		</countries>
		<countries>
			<code>BD</code>
			<name>Bangladesh</name>
		</countries>
		<countries>
			<code>BE</code>
			<name>Belgium</name>
		</countries>
		<countries>
			<name>Burkina Faso</name>
			<code>BF</code>
		</countries>
		<countries>
			<code>BG</code>
			<name>Bulgaria</name>
		</countries>
		<countries>
			<code>BH</code>
			<name>Bahrain</name>
		</countries>
		<countries>
			<code>BI</code>
			<name>Burundi</name>
		</countries>
		<countries>
			<name>Benin</name>
			<code>BJ</code>
		</countries>
		<countries>
			<name>Bermuda</name>
			<code>BM</code>
		</countries>
		<countries>
			<code>BN</code>
			<name>Brunei</name>
		</countries>
		<countries>
			<code>BO</code>
			<name>Bolivia</name>
		</countries>
		<countries>
			<name>British Antarctic Territory</name>
			<code>BQ</code>
		</countries>
		<countries>
			<name>Brazil</name>
			<code>BR</code>
		</countries>
		<countries>
			<code>BS</code>
			<name>Bahamas</name>
		</countries>
		<countries>
			<code>BT</code>
			<name>Bhutan</name>
		</countries>
		<countries>
			<name>Botswana</name>
			<code>BW</code>
		</countries>
		<countries>
			<code>BY</code>
			<name>Belarus</name>
		</countries>
		<countries>
			<code>BZ</code>
			<name>Belize</name>
		</countries>
		<countries>
			<name>Canada</name>
			<code>CA</code>
		</countries>
		<countries>
			<code>CD</code>
			<name>Congo [DRC]</name>
		</countries>
		<countries>
			<name>Central African Republic</name>
			<code>CF</code>
		</countries>
		<countries>
			<name>Congo [Republic]</name>
			<code>CG</code>
		</countries>
		<countries>
			<name>Switzerland</name>
			<code>CH</code>
		</countries>
		<countries>
			<name>Ivory Coast</name>
			<code>CI</code>
		</countries>
		<countries>
			<name>Cook Islands</name>
			<code>CK</code>
		</countries>
		<countries>
			<code>CL</code>
			<name>Chile</name>
		</countries>
		<countries>
			<code>CM</code>
			<name>Cameroon</name>
		</countries>
		<countries>
			<name>China</name>
			<code>CN</code>
		</countries>
		<countries>
			<name>Colombia</name>
			<code>CO</code>
		</countries>
		<countries>
			<name>Costa Rica</name>
			<code>CR</code>
		</countries>
		<countries>
			<name>Cuba</name>
			<code>CU</code>
		</countries>
		<countries>
			<code>CV</code>
			<name>Cape Verde</name>
		</countries>
		<countries>
			<name>Curaçao</name>
			<code>CW</code>
		</countries>
		<countries>
			<name>Cyprus</name>
			<code>CY</code>
		</countries>
		<countries>
			<name>Czech Republic</name>
			<code>CZ</code>
		</countries>
		<countries>
			<code>DE</code>
			<name>Germany</name>
		</countries>
		<countries>
			<code>DJ</code>
			<name>Djibouti</name>
		</countries>
		<countries>
			<name>Denmark</name>
			<code>DK</code>
		</countries>
		<countries>
			<code>DM</code>
			<name>Dominica</name>
		</countries>
		<countries>
			<name>Dominican Republic</name>
			<code>DO</code>
		</countries>
		<countries>
			<name>Algeria</name>
			<code>DZ</code>
		</countries>
		<countries>
			<name>Ecuador</name>
			<code>EC</code>
		</countries>
		<countries>
			<code>EE</code>
			<name>Estonia</name>
		</countries>
		<countries>
			<name>Egypt</name>
			<code>EG</code>
		</countries>
		<countries>
			<code>ER</code>
			<name>Eritrea</name>
		</countries>
		<countries>
			<name>Spain</name>
			<code>ES</code>
		</countries>
		<countries>
			<code>ET</code>
			<name>Ethiopia</name>
		</countries>
		<countries>
			<code>EU</code>
			<name>European Union</name>
		</countries>
		<countries>
			<name>Finland</name>
			<code>FI</code>
		</countries>
		<countries>
			<code>FJ</code>
			<name>Fiji</name>
		</countries>
		<countries>
			<name>Micronesia</name>
			<code>FM</code>
		</countries>
		<countries>
			<code>FO</code>
			<name>Faroe Islands</name>
		</countries>
		<countries>
			<code>FR</code>
			<name>France</name>
		</countries>
		<countries>
			<name>Gabon</name>
			<code>GA</code>
		</countries>
		<countries>
			<name>United Kingdom</name>
			<code>GB</code>
		</countries>
		<countries>
			<code>GD</code>
			<name>Grenada</name>
		</countries>
		<countries>
			<name>Georgia</name>
			<code>GE</code>
		</countries>
		<countries>
			<name>French Guiana</name>
			<code>GF</code>
		</countries>
		<countries>
			<name>Guernsey</name>
			<code>GG</code>
		</countries>
		<countries>
			<code>GH</code>
			<name>Ghana</name>
		</countries>
		<countries>
			<code>GI</code>
			<name>Gibraltar</name>
		</countries>
		<countries>
			<code>GL</code>
			<name>Greenland</name>
		</countries>
		<countries>
			<code>GM</code>
			<name>Gambia</name>
		</countries>
		<countries>
			<code>GN</code>
			<name>Guinea</name>
		</countries>
		<countries>
			<name>Guadeloupe</name>
			<code>GP</code>
		</countries>
		<countries>
			<name>Equatorial Guinea</name>
			<code>GQ</code>
		</countries>
		<countries>
			<name>Greece</name>
			<code>GR</code>
		</countries>
		<countries>
			<code>GT</code>
			<name>Guatemala</name>
		</countries>
		<countries>
			<name>Guam</name>
			<code>GU</code>
		</countries>
		<countries>
			<code>GW</code>
			<name>Guinea-Bissau</name>
		</countries>
		<countries>
			<code>GY</code>
			<name>Guyana</name>
		</countries>
		<countries>
			<name>Hong Kong</name>
			<code>HK</code>
		</countries>
		<countries>
			<name>Honduras</name>
			<code>HN</code>
		</countries>
		<countries>
			<name>Croatia</name>
			<code>HR</code>
		</countries>
		<countries>
			<name>Haiti</name>
			<code>HT</code>
		</countries>
		<countries>
			<code>HU</code>
			<name>Hungary</name>
		</countries>
		<countries>
			<code>ID</code>
			<name>Indonesia</name>
		</countries>
		<countries>
			<code>IE</code>
			<name>Ireland</name>
		</countries>
		<countries>
			<name>Israel</name>
			<code>IL</code>
		</countries>
		<countries>
			<name>Isle of Man</name>
			<code>IM</code>
		</countries>
		<countries>
			<code>IN</code>
			<name>India</name>
		</countries>
		<countries>
			<code>IO</code>
			<name>British Indian Ocean Territory</name>
		</countries>
		<countries>
			<code>IQ</code>
			<name>Iraq</name>
		</countries>
		<countries>
			<name>Iran</name>
			<code>IR</code>
		</countries>
		<countries>
			<name>Iceland</name>
			<code>IS</code>
		</countries>
		<countries>
			<code>IT</code>
			<name>Italy</name>
		</countries>
		<countries>
			<code>JE</code>
			<name>Jersey</name>
		</countries>
		<countries>
			<code>JM</code>
			<name>Jamaica</name>
		</countries>
		<countries>
			<name>Jordan</name>
			<code>JO</code>
		</countries>
		<countries>
			<code>JP</code>
			<name>Japan</name>
		</countries>
		<countries>
			<name>Kenya</name>
			<code>KE</code>
		</countries>
		<countries>
			<code>KG</code>
			<name>Kyrgyzstan</name>
		</countries>
		<countries>
			<name>Cambodia</name>
			<code>KH</code>
		</countries>
		<countries>
			<name>Kiribati</name>
			<code>KI</code>
		</countries>
		<countries>
			<name>Comoros</name>
			<code>KM</code>
		</countries>
		<countries>
			<code>KN</code>
			<name>Saint Kitts and Nevis</name>
		</countries>
		<countries>
			<code>KP</code>
			<name>North Korea</name>
		</countries>
		<countries>
			<name>South Korea</name>
			<code>KR</code>
		</countries>
		<countries>
			<code>KW</code>
			<name>Kuwait</name>
		</countries>
		<countries>
			<code>KY</code>
			<name>Cayman Islands</name>
		</countries>
		<countries>
			<name>Kazakhstan</name>
			<code>KZ</code>
		</countries>
		<countries>
			<code>LA</code>
			<name>Laos</name>
		</countries>
		<countries>
			<name>Lebanon</name>
			<code>LB</code>
		</countries>
		<countries>
			<name>Saint Lucia</name>
			<code>LC</code>
		</countries>
		<countries>
			<name>Liechtenstein</name>
			<code>LI</code>
		</countries>
		<countries>
			<code>LK</code>
			<name>Sri Lanka</name>
		</countries>
		<countries>
			<code>LR</code>
			<name>Liberia</name>
		</countries>
		<countries>
			<name>Lesotho</name>
			<code>LS</code>
		</countries>
		<countries>
			<name>Lithuania</name>
			<code>LT</code>
		</countries>
		<countries>
			<name>Luxembourg</name>
			<code>LU</code>
		</countries>
		<countries>
			<name>Latvia</name>
			<code>LV</code>
		</countries>
		<countries>
			<code>LY</code>
			<name>Libya</name>
		</countries>
		<countries>
			<code>MA</code>
			<name>Morocco</name>
		</countries>
		<countries>
			<name>Monaco</name>
			<code>MC</code>
		</countries>
		<countries>
			<code>MD</code>
			<name>Moldova</name>
		</countries>
		<countries>
			<code>ME</code>
			<name>Montenegro</name>
		</countries>
		<countries>
			<name>Saint Martin</name>
			<code>MF</code>
		</countries>
		<countries>
			<code>MG</code>
			<name>Madagascar</name>
		</countries>
		<countries>
			<name>Marshall Islands</name>
			<code>MH</code>
		</countries>
		<countries>
			<name>Macedonia [FYROM]</name>
			<code>MK</code>
		</countries>
		<countries>
			<name>Mali</name>
			<code>ML</code>
		</countries>
		<countries>
			<name>Myanmar [Burma]</name>
			<code>MM</code>
		</countries>
		<countries>
			<code>MN</code>
			<name>Mongolia</name>
		</countries>
		<countries>
			<code>MO</code>
			<name>Macau</name>
		</countries>
		<countries>
			<name>Northern Mariana Islands</name>
			<code>MP</code>
		</countries>
		<countries>
			<name>Martinique</name>
			<code>MQ</code>
		</countries>
		<countries>
			<code>MR</code>
			<name>Mauritania</name>
		</countries>
		<countries>
			<code>MS</code>
			<name>Montserrat</name>
		</countries>
		<countries>
			<code>MT</code>
			<name>Malta</name>
		</countries>
		<countries>
			<code>MU</code>
			<name>Mauritius</name>
		</countries>
		<countries>
			<code>MV</code>
			<name>Maldives</name>
		</countries>
		<countries>
			<code>MW</code>
			<name>Malawi</name>
		</countries>
		<countries>
			<code>MX</code>
			<name>Mexico</name>
		</countries>
		<countries>
			<code>MY</code>
			<name>Malaysia</name>
		</countries>
		<countries>
			<code>MZ</code>
			<name>Mozambique</name>
		</countries>
		<countries>
			<name>Namibia</name>
			<code>NA</code>
		</countries>
		<countries>
			<code>NC</code>
			<name>New Caledonia</name>
		</countries>
		<countries>
			<code>NE</code>
			<name>Niger</name>
		</countries>
		<countries>
			<name>Norfolk Island</name>
			<code>NF</code>
		</countries>
		<countries>
			<code>NG</code>
			<name>Nigeria</name>
		</countries>
		<countries>
			<name>Nicaragua</name>
			<code>NI</code>
		</countries>
		<countries>
			<code>NL</code>
			<name>Netherlands</name>
		</countries>
		<countries>
			<code>NO</code>
			<name>Norway</name>
		</countries>
		<countries>
			<name>Nepal</name>
			<code>NP</code>
		</countries>
		<countries>
			<code>NR</code>
			<name>Nauru</name>
		</countries>
		<countries>
			<code>NU</code>
			<name>Niue</name>
		</countries>
		<countries>
			<name>New Zealand</name>
			<code>NZ</code>
		</countries>
		<countries>
			<name>Oman</name>
			<code>OM</code>
		</countries>
		<countries>
			<code>PA</code>
			<name>Panama</name>
		</countries>
		<countries>
			<code>PE</code>
			<name>Peru</name>
		</countries>
		<countries>
			<code>PF</code>
			<name>French Polynesia</name>
		</countries>
		<countries>
			<code>PG</code>
			<name>Papua New Guinea</name>
		</countries>
		<countries>
			<name>Philippines</name>
			<code>PH</code>
		</countries>
		<countries>
			<code>PK</code>
			<name>Pakistan</name>
		</countries>
		<countries>
			<code>PL</code>
</result>


Note:

Use WHM's API Shell interface (WHM >> Home >> Development >> API Shell) to directly test WHM API calls.

Parameters

This function does not accept parameters.

Returns

ReturnTypeDescriptionPossbile ValuesExample

countries


array of hashesA list of the ISO 3166-1 alpha-2 code two-letter country codes. You can enter these codes to whitelist or blacklist a country's range of IP addresses in the WHM API 1 function set_cphulk_config_key.

This array includes each country's name as a return.


name

string

The country's name.

The function returns this value in the countries hash.

A valid country name.United States

code

string

The two-letter country code.

The function returns this value in the countries hash.

A valid ISO 3166-1 alpha-2 code two-letter country code.

 Click to view...
CountryCode

Andorra

AD

United Arab Emirates

AE

Afghanistan

AF

Antigua and Barbuda

AG

Anguilla

AI

Albania

AL

Armenia

AM

Angola

AO

Argentina

AR

American Samoa

AS

Austria

AT

Australia

AU

Aruba

AW

Åland Islands

AX

Azerbaijan

AZ

Bosnia and Herzegovina

BA

Barbados

BB

Bangladesh

BD

Belgium

BE

Burkina Faso

BF

Bulgaria

BG

Bahrain

BH

Burundi

BI

Benin

BJ

Bermuda

BM

Brunei

BN

Bolivia

BO

British Antarctic Territory

BQ

Brazil

BR

Bahamas

BS

Bhutan

BT

Botswana

BW

Belarus

BY

Belize

BZ

Canada

CA

Congo [DRC]

CD

Central African Republic

CF

Congo [Republic]

CG

Switzerland

CH

Ivory Coast

CI

Cook Islands

CK

Chile

CL

Cameroon

CM

China

CN

Colombia

CO

Costa Rica

CR

Cuba

CU

Cape Verde

CV

Curaçao

CW

Cyprus

CY

Czech Republic

CZ

Germany

DE

Djibouti

DJ

Denmark

DK

Dominica

DM

Dominican Republic

DO

Algeria

DZ

Ecuador

EC

Estonia

EE

Egypt

EG

Eritrea

ER

Spain

ES

Ethiopia

ET

European Union

EU

Finland

FI

Fiji

FJ

Micronesia

FM

Faroe Islands

FO

France

FR

Gabon

GA

United Kingdom

GB

Grenada

GD

Georgia

GE

French Guiana

GF

Guernsey

GG

Ghana

GH

Gibraltar

GI

Greenland

GL

Gambia

GM

Guinea

GN

Guadeloupe

GP

Equatorial Guinea

GQ

Greece

GR

Guatemala

GT

Guam

GU

Guinea-Bissau

GW

Guyana

GY

Hong Kong

HK

Honduras

HN

Croatia

HR

Haiti

HT

Hungary

HU

Indonesia

ID

Ireland

IE

Israel

IL

Isle of Man

IM

India

IN

British Indian Ocean Territory

IO

Iraq

IQ

Iran

IR

Iceland

IS

Italy

IT

Jersey

JE

Jamaica

JM

Jordan

JO

Japan

JP

Kenya

KE

Kyrgyzstan

KG

Cambodia

KH

Kiribati

KI

Comoros

KM

Saint Kitts and Nevis

KN

North Korea

KP

South Korea

KR

Kuwait

KW

Cayman Islands

KY

Kazakhstan

KZ

Laos

LA

Lebanon

LB

Saint Lucia

LC

Liechtenstein

LI

Sri Lanka

LK

Liberia

LR

Lesotho

LS

Lithuania

LT

Luxembourg

LU

Latvia

LV

Libya

LY

Morocco

MA

Monaco

MC

Moldova

MD

Montenegro

ME

Saint Martin

MF

Madagascar

MG

Marshall Islands

MH

Macedonia [FYROM]

MK

Mali

ML

Myanmar [Burma]

MM

Mongolia

MN

Macau

MO

Northern Mariana Islands

MP

Martinique

MQ

Mauritania

MR

Montserrat

MS

Malta

MT

Mauritius

MU

Maldives

MV

Malawi

MW

Mexico

MX

Malaysia

MY

Mozambique

MZ

Namibia

NA

New Caledonia

NC

Niger

NE

Norfolk Island

NF

Nigeria

NG

Netherlands

NI

Netherlands

NL

Norway

NO

Nepal

NP

Nauru

NR

Niue

NU

New Zealand

NZ

Oman

OM

Panama

PA

Peru

PE

French Polynesia

PF

Papua New Guinea

PG

Philippines

PH

Pakistan

PK

Poland

PL

Saint Pierre and Miquelon

PM

Puerto Rico

PR

Palestinian Territories

PS

Portugal

PT

Palau

PW

Paraguay

PY

Qatar

QA

Réunion

RE

Romania

RO

Serbia

RS

Russia

RU

Rwanda

RW

Saudi Arabia

SA

Solomon Islands

SB

Seychelles

SC

Sudan

SD

Sweden

SE

Singapore

SG

Slovenia

SI

Slovakia

SK

Sierra Leone

SL

San Marino

SM

Senegal

SN

Somalia

SO

Suriname

SR

South Sudan

SS

São Tomé and Príncipe

ST

El Salvador

SV

Saint Maarten

SX

Syria

SY

Swaziland

SZ

Turks and Caicos Islands

TC

Chad

TD

Togo

TG

Thailand

TH

Tajikistan

TJ

Tokelau

TK

East Timor

TL

Turkmenistan

TM

Tunisia

TN

Tonga

TO

Turkey

TR

Trinidad and Tobago

TT

Tuvalu

TV

Taiwan

TW

Tanzania

TZ

Ukraine

UA

Uganda

UG

United States

US

Uruguay

UY

Uzbekistan

UZ

Vatican City

VA

Saint Vincent and the Grenadines

VC

Venezuela

VE

British Virgin Islands

VG

U.S. Virgin Islands

VI

Vietnam

VN

Vanuatu

VU

Wallis and Futuna

WF

Samoa

WS

Yemen

YE

Mayotte

YT

South Africa

ZA

Zambia

ZM

Zimbabwe

ZW

Unknown Region

ZZ


US