This is a package which contains MySQL database of 197 countries with their capitals, currencies, currency codes, TLD-s and calling codes. It also contains PHP class with functions for getting all countries names, the capital of a country by its name, the currency of a country by its name, the currency code of a country by its name, the TLD-s of a country by its name and the calling codes of a country by its name.

Installation

It is very easy to install this package. Just import the the_main_info_of_the_world_countries.sql table to database and include the_main_info_of_the_world_countries.php into the php script. After it create an instance of the class Countries ( For example: $countries = new Countries(); ) and then you can get all countries names, the capital of a country by its name, the currency of a country by its name, the currency code of a country by its name, the TLD-s of a country by its name and the calling codes of a country by its name by using the class functions.

List of the Country class functions:
* getAllCountries() - this function returns an array of the all countries.
* getCapital($country) - this function returns the capital of the country.
* getCurrency($country) - this function returns the currency of the country.
* getCurrencyCode($country) - this function returns the currency code of the country.
* getTLD($country) - this function returns the TLD of the country.
* getCallingCode($country) - this function returns the calling code of the country.

Demo

Demo page created by using the script “The Main Info Of The World Countries” is here.

Version

1.0

Buy

License

Creative Commons License
The Main Info Of The World Countries by Ruben Sargsyan is licensed under a Creative Commons Attribution 3.0 Unported License.

Share

2 Comments on The Main Info Of The World Countries

  1. ryan says:

    this amazing.. how can you do that?
    are you typing one-by-one?

  2. ryan, sorry, but it is my secret. :)

Leave a Reply

*


*

Info