Country Codes

Country codes are based on the user’s IP address. The country ID loads as a session variable $_SESSION['country_id'] and is used for things like preloading address country/state dropdowns, user currency, reporting stats and taxation. It is also displayed as a class in the body tag.

Vendo checks a databse of over 110,000 IP records, which is updated monthly. You should note that no system is 100% accurate when using users IP addresses but will be correct in most instances.

Example usage:

Country ID __up Country Currency ID Region Type Regions Zone ID Phone prefix TLD
United Kingdom 3 Region 4 8 44 co.uk
United States 1 State 51 7 1 com
Sweden 60 0 8 46 se
Italy 2 Province 32 8 39 it
Netherlands 2 Province 13 8 an
Canada 4 Province 13 7 1 ca
Germany 2 Province 16 8 49 ge
Switzerland 6 0 8 41 ch
France 2 0 8 33 fr
Israel 35 0 6 972
Spain 2 Province 51 8 34 es
Chile 17 0 4 56 cl
Bahamas 12 0 4 1-242
Argentina 10 Province 0 4 54 com.ar
Japan 5 Province 0 2 81 jp
India 32 Province 36 2 91 in
Hong Kong 29 0 2 852 com.hk
China 18 Province 0 2 cn
Indonesia 33 Province 32 2 co.id
Malaysia 40 State 17 2 60 com.my
Australia 11 State 8 3 61 com.au
Singapore 55 0 2 65 com.sg
Philippines 48 Province 80 2 63 com.ph
Thailand 62 Province 77 2 66 co.th
Taiwan 61 Province 0 2 886 com.tw
South Korea 58 Province 17 2 82 co.kr
Greece 2 0 8 30 gr
Saudi Arabia 53 0 6 966 sa
Poland 50 Province 17 5 pl
Ireland 2 0 8 ie
Czech Republic 23 Province 0 5 cz
Belgium 2 Province 0 8 32 be
Russian Federation 81 0 5 ru
Kenya 76 Province 0 1
Denmark 24 0 8 45 dk
Egypt 26 0 1
Norway 46 0 8 47 no
Austria 2 Province 10 8 43 at
Ukraine 1 0 5
Tajikistan 1 0 5
Turkey 85 Province 0 8
Serbia and Montenegro 2 Province 0 5
Iran 1 Province 0 6
Georgia 1 0 5
Belarus 1 0 5 375
Azerbaijan 1 0 5
Kuwait 38 Province 0 6 965 kw
Bulgaria 16 0 0
Armenia 1 Province 0 5
Lebanon 39 Province 0 6 961
Bosnia And Herzegovina 1 0 5
Moldova 1 0 5 md
Namibia 1 0 1
Finland 2 Province 7 8 358 fi
Portugal 2 0 8 351 pt
Cameroon 20 Province 0 1 237
Ghana 1 0 1
Zimbabwe 68 Province 0 1
Congo (DC) 20 Province 0 1
Madagascar 68 Province 0 1
Benin 20 0 1
Rwanda 1 Province 0 1 NULL
Togo 20 0 1
Mozambique 1 Province 0 1
Guinea 1 0 1
Zambia 68 Province 0 1
Nigeria 45 State 0 1
Senegal 20 0 1
Angola 68 Province 0 1
Oman 78 0 6
Algeria 9 Province 0 1 213
Estonia 75 0 5
Slovakia 56 0 5 sk
Jordan 37 Province 13 6
Hungary 30 0 5
Lithuania 1 0 5 lt
Latvia 1 0 5 lv
Gibraltar 3 Province 0 8 gi
Swaziland 1 0 1
Kazakhstan 1 0 5
Pakistan 47 Province 0 2
Kyrgyzstan 1 0 2
Iceland 31 0 8
Costa Rica 21 0 4 506 co.cr
Macedonia 1 0 5
Malta 41 0 8
South Africa 57 Province 10 1 27 co.za
Romania 51 0 5 ro
Slovenia 82 0 5
Luxembourg 2 0 8 352 lu
Monaco 2 0 8
Morocco 43 0 1
Trinidad And Tobago 63 0 4 1-868 tt
Lesotho 1 0 1
Puerto Rico 1 Municipios 79 4 1 pr
Colombia 19 0 4
Mauritius 77 0 1
Chad 20 0 1
Liechtenstein 6 0 8
Faroe Islands 1 0 8
Albania 8 0 5 355 al
Yemen 1 Province 0 6
Guinea-bissau 20 0 1
Somalia 1 0 1
United Arab Emirates 65 0 6 971 com.ae
Mongolia 1 Province 0 2
Cyprus 22 0 8
Tanzania 1 0 1
Afghanistan 7 Province 0 6 93 af
Uzbekistan 1 0 5
Croatia 72 0 5
Syria 1 Province 0 6
Mexico 42 State 33 7 52 com.mx
Martinique 2 0 4
Bahrain 70 0 6 54 bh
Burundi 1 Province 0 1
Uganda 1 0 1
Sierra Leone 1 Province 0 1
Venezuela 66 State 50 4 58 com.ve
New Zealand 44 0 3 64 co.nz
Guam 1 0 3
Brazil 15 State 28 4 55 com.br
Fiji 27 0 3 679 com.fj
Brunei Darussalam 1 0 2
Ecuador 1 Province 0 4
Peru 79 0 4
Uruguay 1 0 4 598
Nicaragua 1 0 4
Bolivia 1 Province 0 4 bo
Panama 1 Province 15 4 507 com.pa
Guatemala 1 0 4 502 gt
El Salvador 1 0 4
Cuba 1 Province 0 4
Tunisia 84 0 1
Palestine 1 Province 0 6
Burkina Faso 20 Province 0 1
Niger 20 0 1
French Polynesia 1 0 3 pf
Bermuda 14 0 4
Papua New Guinea 1 Province 0 3 675
Gabon 20 Province 0 1
Macao 1 Province 0 2 853 com.mo
Sri Lanka 83 0 2
Holy See 2 0 8
Guadeloupe 2 0 4
Malawi 1 0 1
Eritrea 1 Province 0 1
Congo (R) 20 Province 0 1
Liberia 1 0 1
Botswana 1 0 1
Comoros 1 0 2
Central African Republic 20 0 1
Djibouti 1 0 1
Mauritania 1 0 1
Equatorial Guinea 20 Province 0 1
Dominican Republic 74 Province 0 4 1-809 com.do
San Marino 2 0 8
Turkmenistan 1 0 5
Reunion 2 0 1
Qatar 80 0 6
Netherlands Antilles 1 Province 0 8
Andorra 2 0 8
Greenland 1 Province 0 8
Cape Verde 1 0 1
Sao Tome And Principe 1 0 1
East Timor 1 0 2
Bangladesh 71 0 2
Jamaica 36 0 4 1-876
Sudan 59 State 0 1
Mali 20 0 1
Nepal 1 0 2
Falkland Islands 3 0 4
Barbados 13 0 4 1-246
Grenada 25 0 4
Suriname 1 0 4
Honduras 1 0 4
Paraguay 1 0 4
Belize 15 0 4 501 bz
Haiti 1 0 4
Solomon Islands 1 Province 0 3
Maldives 1 Province 0 2
Tuvalu 11 0 3 tv
Samoa 1 0 3 ws
Kiribati 11 0 3
New Caledonia 1 Province 0 3 com.nc
Tonga 1 0 3
Cook Islands 44 0 3 682 co.ck
Vanuatu 1 Province 0 3 678 vu
Northern Mariana Islands 1 0 3
Palau 1 0 2
Bhutan 32 0 2
Myanmar 1 0 2 95
Nauru 11 0 3
Vietnam 67 Province 0 2 84 vn
Cambodia 1 Province 0 2 kh
Gambia 1 0 1
Ethiopia 1 State 0 1
Cayman Islands 1 0 4
Antigua And Barbuda 25 0 4
Dominica 25 0 4
Virgin Islands, British 3 0 4 284
Virgin Islands, U.S. 1 0 4
Iraq 1 0 6
Ivory coast 20 0 1
Lybia 1 0 6
Laos 1 0 2 la
Seychelles 1 0 1
American Samoa 1 0 3
North Korea 1 0 2
Bulgaria 69 0 8 359 bg
Montserrat 1 0 0 ms
Non-Spec Asia Pas Location 1 0 0 com
Montenegro 2 Province 0 0 com
European Union 2 Province 0 0
Turks And Caicos Islands 1 Province 0 4
Jersey 3 0 8 33
Serbia 1 Province 0 5
Isle Of Man 3 Region 4 8 44
Guernsey 3 0 8 33
Macau 1 0 2 852
Wallis And Futuna Islands 1 0 3 679
Marshall Islands 1 Province 0 3 675
Micronesia Federated States Of 1 Province 0 3 675
Guyana 1 0 4
Aruba 1 Province 0 8
French Guiana 1 0 4
British Indian Ocean Territory 3 Province 0 2
Niue 44 0 1
Norfolk Island 11 Province 0 3
Anguilla 25 0 4
Saint Kitts And Nevis 25 0 4
Saint Lucia 25 0 4
Saint Vincent And The Grenadin 25 0 4 1-246
Aland Islands 2 Province 7 8 358
Serbia 1 0 5
Serbia and Montenegro 2 0 5
×