Download the PHP package fallenangelbg/bgncurrencytool without Composer

On this page you can find all versions of the php package fallenangelbg/bgncurrencytool. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package bgncurrencytool

Currency tool for Bulgarian Lev

This tool can convert sums to Bulgarian Lev. The courses are read from the Bulgarian National Bank site. It also can return an array with conversions for a list of currencies.

Usage

As a single converter

Convert 100 000 US Dollars to Bulgarian Lev

Result:

As a mass converter

Result:

External read

The tool read a predefined XML file from the site of the Bulgarian National Bank.

The reader only works like this:

Its good to do this via a cron job. Here's an example of SQL table to have the results saved:

Later, you can do a read to this table to get an array similar to this one:

or you can use some cache do read it once a day - Memcached, REDIS, etc. It's important to keep the array in the given format.

Example

In example folder you can find the mentioned examples.

List of currencies

The list of currencies, supported by this tool (and Bulgarian National Bank)

Currency CODE Quantity
Australian Dollar AUD 1
Brazilian Real BRL 10
Canadian Dollar CAD 1
Swiss Franc CHF 1
Chinese Yuan Renminbi CNY 10
Czech Koruna CZK 100
Danish Krone DKK 10
British Pound GBP 1
Hong Kong Dollar HKD 10
Croatian Kuna HRK 10
Hungarian Forint HUF 1000
Indonesian Rupiah IDR 10000
New Israel Shekel ILS 10
Indian Rupee INR 100
Icelandic Krona ISK 100
Japanese Yen JPY 100
South Korean Won KRW 1000
Mexican Peso MXN 100
Malaysian Ringgit MYR 10
Norwegian Krone NOK 10
New Zealand Dollar NZD 1
Philippine Peso PHP 100
Polish Zloty PLN 10
Romanian Leu RON 10
Russian Rouble RUB *
Swedish Krona SEK 10
Singaporean Dollar SGD 1
Thai Baht THB 100
Turkish Lira TRY 10
US Dollar USD 1
South African Rand ZAR 10

Russian Ruble is not used at the moment due to the political situation.


All versions of bgncurrencytool with dependencies

PHP Build Version
Package Version
Requires php Version >=7.1
ext-curl Version *
ext-json Version *
ext-libxml Version *
ext-simplexml Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package fallenangelbg/bgncurrencytool contains the following files

Loading the files please wait ...