PHP Classes

File: src/config/config.example.php

Recommend this page to a friend!
  Classes of Shashwat Mishra  >  PHP API for Currency Conversion  >  src/config/config.example.php  >  Download  
File: src/config/config.example.php
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: PHP API for Currency Conversion
Convert currencies using multiple conversion APIs
Author: By
Last change:
Date: 1 year ago
Size: 2,760 bytes
 

Contents

Class file image Download
<?php

return [

   
/**
     * Default Converter (String)
     * ------------------------------------------------------
     * This Defines from which currency conversion
     * service provider's do you want to start the conversions
     * with.
     * ------------------------------------------------------
     * Values: 'currencylayer', 'exchangerate'
     */
   
"default" => "exchangerate",

   
/**
     * Self Drive Mode (Boolean)
     * ------------------------------------------------------
     * This defines whether the Self Drive Mode or the
     * Smart Mode will be ON (true) or OFF (false).
     * ------------------------------------------------------
     * Values: true, false
     */
   
"selfdrive" => true,

   
/**
     * Cache Duration (Integer)
     * ------------------------------------------------------
     * This Smart Conversions Library uses the Caching to
     * reduce the Quota Utilizations by Caching the Rates
     * and utilising it on concurrent requests.
     * Set it to `0` for real-time updates.
     * (!) NOTE: Usually Providers update their rate on
     * Hourly basis. Therefore if on free plan, setting it
     * on real-time updates will only consume your quota.
     * ------------------------------------------------------
     * Values: Any time frame in Minutes.
     */
   
"cache" => 30, # in Minutes
   
    /**
     * Cache Duration (Integer)
     * ------------------------------------------------------
     * This Smart Conversions Library uses the Caching to
     * reduce the Quota Utilizations by Caching the Rates
     * and utilising it on concurrent requests.
     * This would not be used if real-time updates are
     * active and running.
     * ------------------------------------------------------
     * Values: Folder Location from the root directory of this library.
     */
   
"cache_path" => "cache/", # folder location

    /**
     * API Details (String)
     * ------------------------------------------------------
     * API Details for the CurrencyLayer API
     * ------------------------------------------------------
     * GET YOUR KEY FROM https://www.exchangerate-api.com/
     * GET YOUR KEY FROM https://www.currencylayer.com/
     * ------------------------------------------------------
     * Values: array
     */
   
"api" => [
       
"currencylayer" => [
           
"key" => "YOUR_API_KEY_HERE",
           
"provider" => "http://apilayer.net/api/live?access_key=%s&currencies=%s&format=1",
        ],

       
"exchangerate" => [
           
"key" => "YOUR_API_KEY_HERE",
           
"provider" => "https://v3.exchangerate-api.com/pair/%s/%s/%s",
        ],
    ],
];



For more information send a message to info at phpclasses dot org.