Country Code and Country Name JSON format/File

Leave a Comment

Country Code, name & ID JSON format:

[
    {
        "id": 1,
        "code": "AD",
        "name": "Andorra"
    },
    {
        "id": 2,
        "code": "AE",
        "name": "United Arab Emirates"
    },
    {
        "id": 3,
        "code": "AF",
        "name": "Afghanistan"
    },
    {
        "id": 4,
        "code": "AG",
        "name": "Antigua and Barbuda"
    },
    {
        "id": 5,
        "code": "AI",
        "name": "Anguilla"
    },
    {
        "id": 6,
        "code": "AL",
        "name": "Albania"
    },
    {
        "id": 7,
        "code": "AM",
        "name": "Armenia"
    },
    {
        "id": 8,
        "code": "AO",
        "name": "Angola"
    },
    {
        "id": 9,
        "code": "AQ",
        "name": "Antarctica"
    },
    {
        "id": 10,
        "code": "AR",
        "name": "Argentina"
    },
    {
        "id": 11,
        "code": "AS",
        "name": "American Samoa"
    },
    {
        "id": 12,
        "code": "AT",
        "name": "Austria"
    },
    {
        "id": 13,
        "code": "AU",
        "name": "Australia"
    },
    {
        "id": 14,
        "code": "AW",
        "name": "Aruba"
    },
    {
        "id": 15,
        "code": "AX",
        "name": ".ax"
    },
    {
        "id": 16,
        "code": "AZ",
        "name": "Azerbaijan"
    },
    {
        "id": 17,
        "code": "BA",
        "name": "Bosnia and Herzegovina"
    },
    {
        "id": 18,
        "code": "BB",
        "name": "Barbados"
    },
    {
        "id": 19,
        "code": "BD",
        "name": "Bangladesh"
    },
    {
        "id": 20,
        "code": "BE",
        "name": "Belgium"
    },
    {
        "id": 21,
        "code": "BF",
        "name": "Burkina Faso"
    },
    {
        "id": 22,
        "code": "BG",
        "name": "Bulgaria"
    },
    {
        "id": 23,
        "code": "BH",
        "name": "Bahrain"
    },
    {
        "id": 24,
        "code": "BI",
        "name": "Burundi"
    },
    {
        "id": 25,
        "code": "BJ",
        "name": "Benin"
    },
    {
        "id": 26,
        "code": "BL",
        "name": "Saint Barthélemy"
    },
    {
        "id": 27,
        "code": "BM",
        "name": "Bermuda"
    },
    {
        "id": 28,
        "code": "BN",
        "name": "Brunei Darussalam"
    },
    {
        "id": 29,
        "code": "BO",
        "name": "Bolivia (Plurinational State of)"
    },
    {
        "id": 30,
        "code": "BQ",
        "name": "Bonaire, Sint Eustatius and Saba"
    },
    {
        "id": 31,
        "code": "BR",
        "name": "Brazil"
    },
    {
        "id": 32,
        "code": "BS",
        "name": "Bahamas"
    },
    {
        "id": 33,
        "code": "BT",
        "name": "Bhutan"
    },
    {
        "id": 34,
        "code": "BV",
        "name": "Bouvet Island"
    },
    {
        "id": 35,
        "code": "BW",
        "name": "Botswana"
    },
    {
        "id": 36,
        "code": "BY",
        "name": "Belarus"
    },
    {
        "id": 37,
        "code": "BZ",
        "name": "Belize"
    },
    {
        "id": 38,
        "code": "CA",
        "name": "Canada"
    },
    {
        "id": 39,
        "code": "CC",
        "name": "Cocos (Keeling) Islands"
    },
    {
        "id": 40,
        "code": "CD",
        "name": "Congo, Democratic Republic of the"
    },
    {
        "id": 41,
        "code": "CF",
        "name": "Central African Republic"
    },
    {
        "id": 42,
        "code": "CG",
        "name": "Congo"
    },
    {
        "id": 43,
        "code": "CH",
        "name": "Switzerland"
    },
    {
        "id": 44,
        "code": "CI",
        "name": ".ci"
    },
    {
        "id": 45,
        "code": "CK",
        "name": "Cook Islands"
    },
    {
        "id": 46,
        "code": "CL",
        "name": "Chile"
    },
    {
        "id": 47,
        "code": "CM",
        "name": "Cameroon"
    },
    {
        "id": 48,
        "code": "CN",
        "name": "China"
    },
    {
        "id": 49,
        "code": "CO",
        "name": "Colombia"
    },
    {
        "id": 50,
        "code": "CR",
        "name": "Costa Rica"
    },
    {
        "id": 51,
        "code": "CU",
        "name": "Cuba"
    },
    {
        "id": 52,
        "code": "CV",
        "name": "Cabo Verde"
    },
    {
        "id": 53,
        "code": "CW",
        "name": "Curaçao"
    },
    {
        "id": 54,
        "code": "CX",
        "name": "Christmas Island"
    },
    {
        "id": 55,
        "code": "CY",
        "name": "Cyprus"
    },
    {
        "id": 56,
        "code": "CZ",
        "name": "Czechia"
    },
    {
        "id": 57,
        "code": "DE",
        "name": "Germany"
    },
    {
        "id": 58,
        "code": "DJ",
        "name": "Djibouti"
    },
    {
        "id": 59,
        "code": "DK",
        "name": "Denmark"
    },
    {
        "id": 60,
        "code": "DM",
        "name": "Dominica"
    },
    {
        "id": 61,
        "code": "DO",
        "name": "Dominican Republic"
    },
    {
        "id": 62,
        "code": "DZ",
        "name": "Algeria"
    },
    {
        "id": 63,
        "code": "EC",
        "name": "Ecuador"
    },
    {
        "id": 64,
        "code": "EE",
        "name": "Estonia"
    },
    {
        "id": 65,
        "code": "EG",
        "name": "Egypt"
    },
    {
        "id": 66,
        "code": "EH",
        "name": "Western Sahara"
    },
    {
        "id": 67,
        "code": "ER",
        "name": "Eritrea"
    },
    {
        "id": 68,
        "code": "ES",
        "name": "Spain"
    },
    {
        "id": 69,
        "code": "ET",
        "name": "Ethiopia"
    },
    {
        "id": 70,
        "code": "FI",
        "name": "Finland"
    },
    {
        "id": 71,
        "code": "FJ",
        "name": "Fiji"
    },
    {
        "id": 72,
        "code": "FK",
        "name": "Falkland Islands (Malvinas)"
    },
    {
        "id": 73,
        "code": "FM",
        "name": "Micronesia (Federated States of)"
    },
    {
        "id": 74,
        "code": "FO",
        "name": "Faroe Islands"
    },
    {
        "id": 75,
        "code": "FR",
        "name": "France"
    },
    {
        "id": 76,
        "code": "GA",
        "name": "Gabon"
    },
    {
        "id": 77,
        "code": "GB",
        "name": "United Kingdom of Great Britain and Northern Ireland"
    },
    {
        "id": 78,
        "code": "GD",
        "name": "Grenada"
    },
    {
        "id": 79,
        "code": "GE",
        "name": "Georgia"
    },
    {
        "id": 80,
        "code": "GF",
        "name": "French Guiana"
    },
    {
        "id": 81,
        "code": "GG",
        "name": "Guernsey"
    },
    {
        "id": 82,
        "code": "GH",
        "name": "Ghana"
    },
    {
        "id": 83,
        "code": "GI",
        "name": "Gibraltar"
    },
    {
        "id": 84,
        "code": "GL",
        "name": "Greenland"
    },
    {
        "id": 85,
        "code": "GM",
        "name": "Gambia"
    },
    {
        "id": 86,
        "code": "GN",
        "name": "Guinea"
    },
    {
        "id": 87,
        "code": "GP",
        "name": "Guadeloupe"
    },
    {
        "id": 88,
        "code": "GQ",
        "name": "Equatorial Guinea"
    },
    {
        "id": 89,
        "code": "GR",
        "name": "Greece"
    },
    {
        "id": 90,
        "code": "GS",
        "name": "South Georgia and the South Sandwich Islands"
    },
    {
        "id": 91,
        "code": "GT",
        "name": "Guatemala"
    },
    {
        "id": 92,
        "code": "GU",
        "name": "Guam"
    },
    {
        "id": 93,
        "code": "GW",
        "name": "Guinea-Bissau"
    },
    {
        "id": 94,
        "code": "GY",
        "name": "Guyana"
    },
    {
        "id": 95,
        "code": "HK",
        "name": "Hong Kong"
    },
    {
        "id": 96,
        "code": "HM",
        "name": "Heard Island and McDonald Islands"
    },
    {
        "id": 97,
        "code": "HN",
        "name": "Honduras"
    },
    {
        "id": 98,
        "code": "HR",
        "name": "Croatia"
    },
    {
        "id": 99,
        "code": "HT",
        "name": "Haiti"
    },
    {
        "id": 100,
        "code": "HU",
        "name": "Hungary"
    },
    {
        "id": 101,
        "code": "ID",
        "name": "Indonesia"
    },
    {
        "id": 102,
        "code": "IE",
        "name": "Ireland"
    },
    {
        "id": 103,
        "code": "IL",
        "name": "Israel"
    },
    {
        "id": 104,
        "code": "IM",
        "name": "Isle of Man"
    },
    {
        "id": 105,
        "code": "IN",
        "name": "India"
    },
    {
        "id": 106,
        "code": "IO",
        "name": "British Indian Ocean Territory"
    },
    {
        "id": 107,
        "code": "IQ",
        "name": "Iraq"
    },
    {
        "id": 108,
        "code": "IR",
        "name": "Iran (Islamic Republic of)"
    },
    {
        "id": 109,
        "code": "IS",
        "name": "Iceland"
    },
    {
        "id": 110,
        "code": "IT",
        "name": "Italy"
    },
    {
        "id": 111,
        "code": "JE",
        "name": "Jersey"
    },
    {
        "id": 112,
        "code": "JM",
        "name": "Jamaica"
    },
    {
        "id": 113,
        "code": "JO",
        "name": "Jordan"
    },
    {
        "id": 114,
        "code": "JP",
        "name": "Japan"
    },
    {
        "id": 115,
        "code": "KE",
        "name": "Kenya"
    },
    {
        "id": 116,
        "code": "KG",
        "name": "Kyrgyzstan"
    },
    {
        "id": 117,
        "code": "KH",
        "name": "Cambodia"
    },
    {
        "id": 118,
        "code": "KI",
        "name": "Kiribati"
    },
    {
        "id": 119,
        "code": "KM",
        "name": "Comoros"
    },
    {
        "id": 120,
        "code": "KN",
        "name": "Saint Kitts and Nevis"
    },
    {
        "id": 121,
        "code": "KP",
        "name": "Korea (Democratic People's Republic of)"
    },
    {
        "id": 122,
        "code": "KR",
        "name": "Korea, Republic of"
    },
    {
        "id": 123,
        "code": "KW",
        "name": "Kuwait"
    },
    {
        "id": 124,
        "code": "KY",
        "name": "Cayman Islands"
    },
    {
        "id": 125,
        "code": "KZ",
        "name": "Kazakhstan"
    },
    {
        "id": 126,
        "code": "LA",
        "name": "Lao People's Democratic Republic"
    },
    {
        "id": 127,
        "code": "LB",
        "name": "Lebanon"
    },
    {
        "id": 128,
        "code": "LC",
        "name": "Saint Lucia"
    },
    {
        "id": 129,
        "code": "LI",
        "name": "Liechtenstein"
    },
    {
        "id": 130,
        "code": "LK",
        "name": "Sri Lanka"
    },
    {
        "id": 131,
        "code": "LR",
        "name": "Liberia"
    },
    {
        "id": 132,
        "code": "LS",
        "name": "Lesotho"
    },
    {
        "id": 133,
        "code": "LT",
        "name": "Lithuania"
    },
    {
        "id": 134,
        "code": "LU",
        "name": "Luxembourg"
    },
    {
        "id": 135,
        "code": "LV",
        "name": "Latvia"
    },
    {
        "id": 136,
        "code": "LY",
        "name": "Libya"
    },
    {
        "id": 137,
        "code": "MA",
        "name": "Morocco"
    },
    {
        "id": 138,
        "code": "MC",
        "name": "Monaco"
    },
    {
        "id": 139,
        "code": "MD",
        "name": "Moldova, Republic of"
    },
    {
        "id": 140,
        "code": "ME",
        "name": "Montenegro"
    },
    {
        "id": 141,
        "code": "MF",
        "name": "Saint Martin (French part)"
    },
    {
        "id": 142,
        "code": "MG",
        "name": "Madagascar"
    },
    {
        "id": 143,
        "code": "MH",
        "name": "Marshall Islands"
    },
    {
        "id": 144,
        "code": "MK",
        "name": "North Macedonia"
    },
    {
        "id": 145,
        "code": "ML",
        "name": "Mali"
    },
    {
        "id": 146,
        "code": "MM",
        "name": "Myanmar"
    },
    {
        "id": 147,
        "code": "MN",
        "name": "Mongolia"
    },
    {
        "id": 148,
        "code": "MO",
        "name": "Macao"
    },
    {
        "id": 149,
        "code": "MP",
        "name": "Northern Mariana Islands"
    },
    {
        "id": 150,
        "code": "MQ",
        "name": "Martinique"
    },
    {
        "id": 151,
        "code": "MR",
        "name": "Mauritania"
    },
    {
        "id": 152,
        "code": "MS",
        "name": "Montserrat"
    },
    {
        "id": 153,
        "code": "MT",
        "name": "Malta"
    },
    {
        "id": 154,
        "code": "MU",
        "name": "Mauritius"
    },
    {
        "id": 155,
        "code": "MV",
        "name": "Maldives"
    },
    {
        "id": 156,
        "code": "MW",
        "name": "Malawi"
    },
    {
        "id": 157,
        "code": "MX",
        "name": "Mexico"
    },
    {
        "id": 158,
        "code": "MY",
        "name": "Malaysia"
    },
    {
        "id": 159,
        "code": "MZ",
        "name": "Mozambique"
    },
    {
        "id": 160,
        "code": "NA",
        "name": "Namibia"
    },
    {
        "id": 161,
        "code": "NC",
        "name": "New Caledonia"
    },
    {
        "id": 162,
        "code": "NE",
        "name": "Niger"
    },
    {
        "id": 163,
        "code": "NF",
        "name": "Norfolk Island"
    },
    {
        "id": 164,
        "code": "NG",
        "name": "Nigeria"
    },
    {
        "id": 165,
        "code": "NI",
        "name": "Nicaragua"
    },
    {
        "id": 166,
        "code": "NL",
        "name": "Netherlands"
    },
    {
        "id": 167,
        "code": "NO",
        "name": "Norway"
    },
    {
        "id": 168,
        "code": "NP",
        "name": "Nepal"
    },
    {
        "id": 169,
        "code": "NR",
        "name": "Nauru"
    },
    {
        "id": 170,
        "code": "NU",
        "name": "Niue"
    },
    {
        "id": 171,
        "code": "NZ",
        "name": "New Zealand"
    },
    {
        "id": 172,
        "code": "OM",
        "name": "Oman"
    },
    {
        "id": 173,
        "code": "PA",
        "name": "Panama"
    },
    {
        "id": 174,
        "code": "PE",
        "name": "Peru"
    },
    {
        "id": 175,
        "code": "PF",
        "name": "French Polynesia"
    },
    {
        "id": 176,
        "code": "PG",
        "name": "Papua New Guinea"
    },
    {
        "id": 177,
        "code": "PH",
        "name": "Philippines"
    },
    {
        "id": 178,
        "code": "PK",
        "name": "Pakistan"
    },
    {
        "id": 179,
        "code": "PL",
        "name": "Poland"
    },
    {
        "id": 180,
        "code": "PM",
        "name": "Saint Pierre and Miquelon"
    },
    {
        "id": 181,
        "code": "PN",
        "name": "Pitcairn"
    },
    {
        "id": 182,
        "code": "PR",
        "name": "Puerto Rico"
    },
    {
        "id": 183,
        "code": "PS",
        "name": "Palestine, State of"
    },
    {
        "id": 184,
        "code": "PT",
        "name": "Portugal"
    },
    {
        "id": 185,
        "code": "PW",
        "name": "Palau"
    },
    {
        "id": 186,
        "code": "PY",
        "name": "Paraguay"
    },
    {
        "id": 187,
        "code": "QA",
        "name": "Qatar"
    },
    {
        "id": 188,
        "code": "RE",
        "name": ".re"
    },
    {
        "id": 189,
        "code": "RO",
        "name": "Romania"
    },
    {
        "id": 190,
        "code": "RS",
        "name": "Serbia"
    },
    {
        "id": 191,
        "code": "RU",
        "name": "Russian Federation"
    },
    {
        "id": 192,
        "code": "RW",
        "name": "Rwanda"
    },
    {
        "id": 193,
        "code": "SA",
        "name": "Saudi Arabia"
    },
    {
        "id": 194,
        "code": "SB",
        "name": "Solomon Islands"
    },
    {
        "id": 195,
        "code": "SC",
        "name": "Seychelles"
    },
    {
        "id": 196,
        "code": "SD",
        "name": "Sudan"
    },
    {
        "id": 197,
        "code": "SE",
        "name": "Sweden"
    },
    {
        "id": 198,
        "code": "SG",
        "name": "Singapore"
    },
    {
        "id": 199,
        "code": "SH",
        "name": "Saint Helena, Ascension and Tristan da Cunha"
    },
    {
        "id": 200,
        "code": "SI",
        "name": "Slovenia"
    },
    {
        "id": 201,
        "code": "SJ",
        "name": "Svalbard and Jan Mayen"
    },
    {
        "id": 202,
        "code": "SK",
        "name": "Slovakia"
    },
    {
        "id": 203,
        "code": "SL",
        "name": "Sierra Leone"
    },
    {
        "id": 204,
        "code": "SM",
        "name": "San Marino"
    },
    {
        "id": 205,
        "code": "SN",
        "name": "Senegal"
    },
    {
        "id": 206,
        "code": "SO",
        "name": "Somalia"
    },
    {
        "id": 207,
        "code": "SR",
        "name": "Suriname"
    },
    {
        "id": 208,
        "code": "SS",
        "name": "South Sudan"
    },
    {
        "id": 209,
        "code": "ST",
        "name": "Sao Tome and Principe"
    },
    {
        "id": 210,
        "code": "SV",
        "name": "El Salvador"
    },
    {
        "id": 211,
        "code": "SX",
        "name": "Sint Maarten (Dutch part)"
    },
    {
        "id": 212,
        "code": "SY",
        "name": "Syrian Arab Republic"
    },
    {
        "id": 213,
        "code": "SZ",
        "name": "Eswatini"
    },
    {
        "id": 214,
        "code": "TC",
        "name": "Turks and Caicos Islands"
    },
    {
        "id": 215,
        "code": "TD",
        "name": "Chad"
    },
    {
        "id": 216,
        "code": "TF",
        "name": "French Southern Territories"
    },
    {
        "id": 217,
        "code": "TG",
        "name": "Togo"
    },
    {
        "id": 218,
        "code": "TH",
        "name": "Thailand"
    },
    {
        "id": 219,
        "code": "TJ",
        "name": "Tajikistan"
    },
    {
        "id": 220,
        "code": "TK",
        "name": "Tokelau"
    },
    {
        "id": 221,
        "code": "TL",
        "name": "Timor-Leste"
    },
    {
        "id": 222,
        "code": "TM",
        "name": "Turkmenistan"
    },
    {
        "id": 223,
        "code": "TN",
        "name": "Tunisia"
    },
    {
        "id": 224,
        "code": "TO",
        "name": "Tonga"
    },
    {
        "id": 225,
        "code": "TR",
        "name": "Turkey"
    },
    {
        "id": 226,
        "code": "TT",
        "name": "Trinidad and Tobago"
    },
    {
        "id": 227,
        "code": "TV",
        "name": "Tuvalu"
    },
    {
        "id": 228,
        "code": "TW",
        "name": "Taiwan, Province of China"
    },
    {
        "id": 229,
        "code": "TZ",
        "name": "Tanzania, United Republic of"
    },
    {
        "id": 230,
        "code": "UA",
        "name": "Ukraine"
    },
    {
        "id": 231,
        "code": "UG",
        "name": "Uganda"
    },
    {
        "id": 232,
        "code": "UM",
        "name": "United States Minor Outlying Islands"
    },
    {
        "id": 233,
        "code": "US",
        "name": "United States of America"
    },
    {
        "id": 234,
        "code": "UY",
        "name": "Uruguay"
    },
    {
        "id": 235,
        "code": "UZ",
        "name": "Uzbekistan"
    },
    {
        "id": 236,
        "code": "VA",
        "name": "Holy See"
    },
    {
        "id": 237,
        "code": "VC",
        "name": "Saint Vincent and the Grenadines"
    },
    {
        "id": 238,
        "code": "VE",
        "name": "Venezuela (Bolivarian Republic of)"
    },
    {
        "id": 239,
        "code": "VG",
        "name": "Virgin Islands (British)"
    },
    {
        "id": 240,
        "code": "VI",
        "name": "Virgin Islands (U.S.)"
    },
    {
        "id": 241,
        "code": "VN",
        "name": "Viet Nam"
    },
    {
        "id": 242,
        "code": "VU",
        "name": "Vanuatu"
    },
    {
        "id": 243,
        "code": "WF",
        "name": "Wallis and Futuna"
    },
    {
        "id": 244,
        "code": "WS",
        "name": "Samoa"
    },
    {
        "id": 245,
        "code": "YE",
        "name": "Yemen"
    },
    {
        "id": 246,
        "code": "YT",
        "name": "Mayotte"
    },
    {
        "id": 247,
        "code": "ZA",
        "name": "South Africa"
    },
    {
        "id": 248,
        "code": "ZM",
        "name": "Zambia"
    },
    {
        "id": 249,
        "code": "ZW",
        "name": "Zimbabwe"
    }
]

Country Code & name JSON format:

[
    {
        "code": "AD",
        "name": "Andorra"
    },
    {
        "code": "AE",
        "name": "United Arab Emirates"
    },
    {
        "code": "AF",
        "name": "Afghanistan"
    },
    {
        "code": "AG",
        "name": "Antigua and Barbuda"
    },
    {
        "code": "AI",
        "name": "Anguilla"
    },
    {
        "code": "AL",
        "name": "Albania"
    },
    {
        "code": "AM",
        "name": "Armenia"
    },
    {
        "code": "AO",
        "name": "Angola"
    },
    {
        "code": "AQ",
        "name": "Antarctica"
    },
    {
        "code": "AR",
        "name": "Argentina"
    },
    {
        "code": "AS",
        "name": "American Samoa"
    },
    {
        "code": "AT",
        "name": "Austria"
    },
    {
        "code": "AU",
        "name": "Australia"
    },
    {
        "code": "AW",
        "name": "Aruba"
    },
    {
        "code": "AX",
        "name": ".ax"
    },
    {
        "code": "AZ",
        "name": "Azerbaijan"
    },
    {
        "code": "BA",
        "name": "Bosnia and Herzegovina"
    },
    {
        "code": "BB",
        "name": "Barbados"
    },
    {
        "code": "BD",
        "name": "Bangladesh"
    },
    {
        "code": "BE",
        "name": "Belgium"
    },
    {
        "code": "BF",
        "name": "Burkina Faso"
    },
    {
        "code": "BG",
        "name": "Bulgaria"
    },
    {
        "code": "BH",
        "name": "Bahrain"
    },
    {
        "code": "BI",
        "name": "Burundi"
    },
    {
        "code": "BJ",
        "name": "Benin"
    },
    {
        "code": "BL",
        "name": "Saint Barthélemy"
    },
    {
        "code": "BM",
        "name": "Bermuda"
    },
    {
        "code": "BN",
        "name": "Brunei Darussalam"
    },
    {
        "code": "BO",
        "name": "Bolivia (Plurinational State of)"
    },
    {
        "code": "BQ",
        "name": "Bonaire, Sint Eustatius and Saba"
    },
    {
        "code": "BR",
        "name": "Brazil"
    },
    {
        "code": "BS",
        "name": "Bahamas"
    },
    {
        "code": "BT",
        "name": "Bhutan"
    },
    {
        "code": "BV",
        "name": "Bouvet Island"
    },
    {
        "code": "BW",
        "name": "Botswana"
    },
    {
        "code": "BY",
        "name": "Belarus"
    },
    {
        "code": "BZ",
        "name": "Belize"
    },
    {
        "code": "CA",
        "name": "Canada"
    },
    {
        "code": "CC",
        "name": "Cocos (Keeling) Islands"
    },
    {
        "code": "CD",
        "name": "Congo, Democratic Republic of the"
    },
    {
        "code": "CF",
        "name": "Central African Republic"
    },
    {
        "code": "CG",
        "name": "Congo"
    },
    {
        "code": "CH",
        "name": "Switzerland"
    },
    {
        "code": "CI",
        "name": ".ci"
    },
    {
        "code": "CK",
        "name": "Cook Islands"
    },
    {
        "code": "CL",
        "name": "Chile"
    },
    {
        "code": "CM",
        "name": "Cameroon"
    },
    {
        "code": "CN",
        "name": "China"
    },
    {
        "code": "CO",
        "name": "Colombia"
    },
    {
        "code": "CR",
        "name": "Costa Rica"
    },
    {
        "code": "CU",
        "name": "Cuba"
    },
    {
        "code": "CV",
        "name": "Cabo Verde"
    },
    {
        "code": "CW",
        "name": "Curaçao"
    },
    {
        "code": "CX",
        "name": "Christmas Island"
    },
    {
        "code": "CY",
        "name": "Cyprus"
    },
    {
        "code": "CZ",
        "name": "Czechia"
    },
    {
        "code": "DE",
        "name": "Germany"
    },
    {
        "code": "DJ",
        "name": "Djibouti"
    },
    {
        "code": "DK",
        "name": "Denmark"
    },
    {
        "code": "DM",
        "name": "Dominica"
    },
    {
        "code": "DO",
        "name": "Dominican Republic"
    },
    {
        "code": "DZ",
        "name": "Algeria"
    },
    {
        "code": "EC",
        "name": "Ecuador"
    },
    {
        "code": "EE",
        "name": "Estonia"
    },
    {
        "code": "EG",
        "name": "Egypt"
    },
    {
        "code": "EH",
        "name": "Western Sahara"
    },
    {
        "code": "ER",
        "name": "Eritrea"
    },
    {
        "code": "ES",
        "name": "Spain"
    },
    {
        "code": "ET",
        "name": "Ethiopia"
    },
    {
        "code": "FI",
        "name": "Finland"
    },
    {
        "code": "FJ",
        "name": "Fiji"
    },
    {
        "code": "FK",
        "name": "Falkland Islands (Malvinas)"
    },
    {
        "code": "FM",
        "name": "Micronesia (Federated States of)"
    },
    {
        "code": "FO",
        "name": "Faroe Islands"
    },
    {
        "code": "FR",
        "name": "France"
    },
    {
        "code": "GA",
        "name": "Gabon"
    },
    {
        "code": "GB",
        "name": "United Kingdom of Great Britain and Northern Ireland"
    },
    {
        "code": "GD",
        "name": "Grenada"
    },
    {
        "code": "GE",
        "name": "Georgia"
    },
    {
        "code": "GF",
        "name": "French Guiana"
    },
    {
        "code": "GG",
        "name": "Guernsey"
    },
    {
        "code": "GH",
        "name": "Ghana"
    },
    {
        "code": "GI",
        "name": "Gibraltar"
    },
    {
        "code": "GL",
        "name": "Greenland"
    },
    {
        "code": "GM",
        "name": "Gambia"
    },
    {
        "code": "GN",
        "name": "Guinea"
    },
    {
        "code": "GP",
        "name": "Guadeloupe"
    },
    {
        "code": "GQ",
        "name": "Equatorial Guinea"
    },
    {
        "code": "GR",
        "name": "Greece"
    },
    {
        "code": "GS",
        "name": "South Georgia and the South Sandwich Islands"
    },
    {
        "code": "GT",
        "name": "Guatemala"
    },
    {
        "code": "GU",
        "name": "Guam"
    },
    {
        "code": "GW",
        "name": "Guinea-Bissau"
    },
    {
        "code": "GY",
        "name": "Guyana"
    },
    {
        "code": "HK",
        "name": "Hong Kong"
    },
    {
        "code": "HM",
        "name": "Heard Island and McDonald Islands"
    },
    {
        "code": "HN",
        "name": "Honduras"
    },
    {
        "code": "HR",
        "name": "Croatia"
    },
    {
        "code": "HT",
        "name": "Haiti"
    },
    {
        "code": "HU",
        "name": "Hungary"
    },
    {
        "code": "ID",
        "name": "Indonesia"
    },
    {
        "code": "IE",
        "name": "Ireland"
    },
    {
        "code": "IL",
        "name": "Israel"
    },
    {
        "code": "IM",
        "name": "Isle of Man"
    },
    {
        "code": "IN",
        "name": "India"
    },
    {
        "code": "IO",
        "name": "British Indian Ocean Territory"
    },
    {
        "code": "IQ",
        "name": "Iraq"
    },
    {
        "code": "IR",
        "name": "Iran (Islamic Republic of)"
    },
    {
        "code": "IS",
        "name": "Iceland"
    },
    {
        "code": "IT",
        "name": "Italy"
    },
    {
        "code": "JE",
        "name": "Jersey"
    },
    {
        "code": "JM",
        "name": "Jamaica"
    },
    {
        "code": "JO",
        "name": "Jordan"
    },
    {
        "code": "JP",
        "name": "Japan"
    },
    {
        "code": "KE",
        "name": "Kenya"
    },
    {
        "code": "KG",
        "name": "Kyrgyzstan"
    },
    {
        "code": "KH",
        "name": "Cambodia"
    },
    {
        "code": "KI",
        "name": "Kiribati"
    },
    {
        "code": "KM",
        "name": "Comoros"
    },
    {
        "code": "KN",
        "name": "Saint Kitts and Nevis"
    },
    {
        "code": "KP",
        "name": "Korea (Democratic People's Republic of)"
    },
    {
        "code": "KR",
        "name": "Korea, Republic of"
    },
    {
        "code": "KW",
        "name": "Kuwait"
    },
    {
        "code": "KY",
        "name": "Cayman Islands"
    },
    {
        "code": "KZ",
        "name": "Kazakhstan"
    },
    {
        "code": "LA",
        "name": "Lao People's Democratic Republic"
    },
    {
        "code": "LB",
        "name": "Lebanon"
    },
    {
        "code": "LC",
        "name": "Saint Lucia"
    },
    {
        "code": "LI",
        "name": "Liechtenstein"
    },
    {
        "code": "LK",
        "name": "Sri Lanka"
    },
    {
        "code": "LR",
        "name": "Liberia"
    },
    {
        "code": "LS",
        "name": "Lesotho"
    },
    {
        "code": "LT",
        "name": "Lithuania"
    },
    {
        "code": "LU",
        "name": "Luxembourg"
    },
    {
        "code": "LV",
        "name": "Latvia"
    },
    {
        "code": "LY",
        "name": "Libya"
    },
    {
        "code": "MA",
        "name": "Morocco"
    },
    {
        "code": "MC",
        "name": "Monaco"
    },
    {
        "code": "MD",
        "name": "Moldova, Republic of"
    },
    {
        "code": "ME",
        "name": "Montenegro"
    },
    {
        "code": "MF",
        "name": "Saint Martin (French part)"
    },
    {
        "code": "MG",
        "name": "Madagascar"
    },
    {
        "code": "MH",
        "name": "Marshall Islands"
    },
    {
        "code": "MK",
        "name": "North Macedonia"
    },
    {
        "code": "ML",
        "name": "Mali"
    },
    {
        "code": "MM",
        "name": "Myanmar"
    },
    {
        "code": "MN",
        "name": "Mongolia"
    },
    {
        "code": "MO",
        "name": "Macao"
    },
    {
        "code": "MP",
        "name": "Northern Mariana Islands"
    },
    {
        "code": "MQ",
        "name": "Martinique"
    },
    {
        "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"
    },
    {
        "code": "NA",
        "name": "Namibia"
    },
    {
        "code": "NC",
        "name": "New Caledonia"
    },
    {
        "code": "NE",
        "name": "Niger"
    },
    {
        "code": "NF",
        "name": "Norfolk Island"
    },
    {
        "code": "NG",
        "name": "Nigeria"
    },
    {
        "code": "NI",
        "name": "Nicaragua"
    },
    {
        "code": "NL",
        "name": "Netherlands"
    },
    {
        "code": "NO",
        "name": "Norway"
    },
    {
        "code": "NP",
        "name": "Nepal"
    },
    {
        "code": "NR",
        "name": "Nauru"
    },
    {
        "code": "NU",
        "name": "Niue"
    },
    {
        "code": "NZ",
        "name": "New Zealand"
    },
    {
        "code": "OM",
        "name": "Oman"
    },
    {
        "code": "PA",
        "name": "Panama"
    },
    {
        "code": "PE",
        "name": "Peru"
    },
    {
        "code": "PF",
        "name": "French Polynesia"
    },
    {
        "code": "PG",
        "name": "Papua New Guinea"
    },
    {
        "code": "PH",
        "name": "Philippines"
    },
    {
        "code": "PK",
        "name": "Pakistan"
    },
    {
        "code": "PL",
        "name": "Poland"
    },
    {
        "code": "PM",
        "name": "Saint Pierre and Miquelon"
    },
    {
        "code": "PN",
        "name": "Pitcairn"
    },
    {
        "code": "PR",
        "name": "Puerto Rico"
    },
    {
        "code": "PS",
        "name": "Palestine, State of"
    },
    {
        "code": "PT",
        "name": "Portugal"
    },
    {
        "code": "PW",
        "name": "Palau"
    },
    {
        "code": "PY",
        "name": "Paraguay"
    },
    {
        "code": "QA",
        "name": "Qatar"
    },
    {
        "code": "RE",
        "name": ".re"
    },
    {
        "code": "RO",
        "name": "Romania"
    },
    {
        "code": "RS",
        "name": "Serbia"
    },
    {
        "code": "RU",
        "name": "Russian Federation"
    },
    {
        "code": "RW",
        "name": "Rwanda"
    },
    {
        "code": "SA",
        "name": "Saudi Arabia"
    },
    {
        "code": "SB",
        "name": "Solomon Islands"
    },
    {
        "code": "SC",
        "name": "Seychelles"
    },
    {
        "code": "SD",
        "name": "Sudan"
    },
    {
        "code": "SE",
        "name": "Sweden"
    },
    {
        "code": "SG",
        "name": "Singapore"
    },
    {
        "code": "SH",
        "name": "Saint Helena, Ascension and Tristan da Cunha"
    },
    {
        "code": "SI",
        "name": "Slovenia"
    },
    {
        "code": "SJ",
        "name": "Svalbard and Jan Mayen"
    },
    {
        "code": "SK",
        "name": "Slovakia"
    },
    {
        "code": "SL",
        "name": "Sierra Leone"
    },
    {
        "code": "SM",
        "name": "San Marino"
    },
    {
        "code": "SN",
        "name": "Senegal"
    },
    {
        "code": "SO",
        "name": "Somalia"
    },
    {
        "code": "SR",
        "name": "Suriname"
    },
    {
        "code": "SS",
        "name": "South Sudan"
    },
    {
        "code": "ST",
        "name": "Sao Tome and Principe"
    },
    {
        "code": "SV",
        "name": "El Salvador"
    },
    {
        "code": "SX",
        "name": "Sint Maarten (Dutch part)"
    },
    {
        "code": "SY",
        "name": "Syrian Arab Republic"
    },
    {
        "code": "SZ",
        "name": "Eswatini"
    },
    {
        "code": "TC",
        "name": "Turks and Caicos Islands"
    },
    {
        "code": "TD",
        "name": "Chad"
    },
    {
        "code": "TF",
        "name": "French Southern Territories"
    },
    {
        "code": "TG",
        "name": "Togo"
    },
    {
        "code": "TH",
        "name": "Thailand"
    },
    {
        "code": "TJ",
        "name": "Tajikistan"
    },
    {
        "code": "TK",
        "name": "Tokelau"
    },
    {
        "code": "TL",
        "name": "Timor-Leste"
    },
    {
        "code": "TM",
        "name": "Turkmenistan"
    },
    {
        "code": "TN",
        "name": "Tunisia"
    },
    {
        "code": "TO",
        "name": "Tonga"
    },
    {
        "code": "TR",
        "name": "Turkey"
    },
    {
        "code": "TT",
        "name": "Trinidad and Tobago"
    },
    {
        "code": "TV",
        "name": "Tuvalu"
    },
    {
        "code": "TW",
        "name": "Taiwan, Province of China"
    },
    {
        "code": "TZ",
        "name": "Tanzania, United Republic of"
    },
    {
        "code": "UA",
        "name": "Ukraine"
    },
    {
        "code": "UG",
        "name": "Uganda"
    },
    {
        "code": "UM",
        "name": "United States Minor Outlying Islands"
    },
    {
        "code": "US",
        "name": "United States of America"
    },
    {
        "code": "UY",
        "name": "Uruguay"
    },
    {
        "code": "UZ",
        "name": "Uzbekistan"
    },
    {
        "code": "VA",
        "name": "Holy See"
    },
    {
        "code": "VC",
        "name": "Saint Vincent and the Grenadines"
    },
    {
        "code": "VE",
        "name": "Venezuela (Bolivarian Republic of)"
    },
    {
        "code": "VG",
        "name": "Virgin Islands (British)"
    },
    {
        "code": "VI",
        "name": "Virgin Islands (U.S.)"
    },
    {
        "code": "VN",
        "name": "Viet Nam"
    },
    {
        "code": "VU",
        "name": "Vanuatu"
    },
    {
        "code": "WF",
        "name": "Wallis and Futuna"
    },
    {
        "code": "WS",
        "name": "Samoa"
    },
    {
        "code": "YE",
        "name": "Yemen"
    },
    {
        "code": "YT",
        "name": "Mayotte"
    },
    {
        "code": "ZA",
        "name": "South Africa"
    },
    {
        "code": "ZM",
        "name": "Zambia"
    },
    {
        "code": "ZW",
        "name": "Zimbabwe"
    }
]

Use Different PHP version During Composer Install or Update

Leave a Comment
Use following command to specify PHP version.
php7.2 /usr/bin/composer install
OR
php7.2 /usr/bin/composer update
/usr/bin/php7.2 /usr/bin/composer install
OR
/usr/bin/php7.2 /usr/bin/composer update
If you get any error like Could not open input file: composer, then composer excitable location is incorrect. To find exact location use the following command 
which composer
To know php7.2 location use the follwing command
which php7.2

PHP missing extension ext-mbstring during Composer Install or update

Leave a Comment
When you do
composer install
or
composer update
, you may get following error 
phpunit/phpunit 7.5.9 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
Your PHP version missing php-mbstring extension, so please go head and install php-mbstring extension using following command.
sudo apt install php-mbstring

For PHP 7.0

sudo apt install php7.0-mbstring

For PHP 7.1

sudo apt install php7.1-mbstring

For PHP 7.2

sudo apt install php7.2-mbstring

For PHP 7.3

sudo apt install php7.3-mbstring

For PHP 7.4

sudo apt install php7.4-mbstring

PHP missing extension ext-dom during Composer Install

Leave a Comment
When you do
composer install
or
composer update
, you may get following error 
phpunit/phpunit 7.5.9 requires ext-dom * -> the requested PHP extension dom is missing from your system
Your PHP version missing php-xml extension, so please go head and install php-xml extension using following command.
sudo apt install php-xml

For PHP 7.0

sudo apt install php7.0-xml

For PHP 7.1

sudo apt install php7.1-xml

For PHP 7.2

sudo apt install php7.2-xml

For PHP 7.3

sudo apt install php7.3-xml

For PHP 7.4

sudo apt install php7.4-xml

Wordpress Update Failed - Inconsistent file permissions.: wp-admin/includes/update-core.php

Leave a Comment
This is usually because of the user that excuting PHP doesn't have proper execution permission. Please change the owner and the group to the www-data of all the files and folders appearing in the errors during wordpress upgrade.
sudo chown -R www-data:www-data /var/www/html

Get GIT remote url

Leave a Comment
Please use the following command to get remote URL

git config --get remote.origin.url

Step 2:

Open config file in the .git folder in your project folder.
[core]
	repositoryformatversion = 0
	filemode = true
	bare = false
	logallrefupdates = true
	ignorecase = true
	precomposeunicode = true
[remote "origin"]
	url = ssh://git@github.com:7999/sample.git
	fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
	remote = origin
	merge = refs/heads/master
Where URL is the remote origin url.

Force PHP Guzzle to use IPV4

Leave a Comment
You may be connection timeout error, while making API request via Guzzle. It may caused by following issues. 1. Check your internet connectivity. 2. It may be misconfiguration of IPV6 in your server. So you may need disable IPV6 or set the priority to IPV4. Just follow below tutorial to set priority to IPV4 over IPV6. https://forum.smarttutorials.net/2020/06/checking-http-connectivity-to-packagist-fail-composer-Linux.html Provide following option to Guzzle while making HTTP request.

'force_ip_resolve' => 'v4',

GET Request


<?php
use GuzzleHttp\Client as Guzzle;

$guzzle = new Guzzle();

$res = $guzzle->get($api_url, [
    'http_errors' => false,
    'verify' => false,
    'force_ip_resolve' => 'v4',
    'query' => [
        'user' => 'muni'
    ]
]);

POST Request


<?php
use GuzzleHttp\Client as Guzzle;

$guzzle = new Guzzle();

$guzzle->request('post', $api_url, [
    'http_errors' => false,
    'verify' => false,
    'force_ip_resolve' => 'v4',
    'form_params' => [
        'request_url'  => $url,
        'name' => 'muni'
    ]
]);