Subversion Repositories cheapmusic

Rev

Rev 9 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

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