1. Go to this page and download the library: Download mlevent/tcmb library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
mlevent / tcmb example snippets
use Mlevent\Tcmb\Tcmb;
$tcmb = new Tcmb;
// Dolar kuruna ait detaylar
var_dump($tcmb->get('USD'));
// Bu kullanım da aynı sonucu verecektir
var_dump($tcmb->getUsd());
use Mlevent\FileCache\FileCache;
use Mlevent\Tcmb\Tcmb;
$tcmb = new Tcmb;
// Veriler 60 saniye boyunca diskte saklanacak
$data = (new FileCache)->refresh('exchange-rates', function () use ($tcmb) {
return $tcmb->fetchExchangeRates();
}, 60);
// Veri içe aktarılıyor
$tcmb->setExchangeRates($data);
echo $tcmb->getUsd()->forexSelling; // 27.0741
/**
* Döviz Listesi
* @return array
*/
$tcmb->getCurrencies();
/**
* Tüm Döviz Cinslerine Ait Kur Bilgileri
* @return array
*/
$tcmb->getExchangeRates();
/**
* TCMB Bülten Yayınlanma Tarihi
* @return string
*/
$tcmb->getBulletinDate();
/**
* TCMB Bülten Numarası
* @return string
*/
$tcmb->getBulletinNumber();
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.