Messtone LLC Manages(Currencylayer): Real-time

Messtone Devices Enables the latest exchanging rate data via PHP(CURL): //set API Endpoint and access key(and any options of Messtone choice) Sendpoint=’live’;$access_key=’MESSTONE_ACCESS_KEY’;//Initialize CURL:$ch=curl_init(‘https://api.currencylayer.com/’.Sendpoint.’?access_key=’.$access_key.’ ‘);crul_setopt($ch, ,true);//Store the data:$json=curl_exec($ch);curl_close($ch);//Decode JSON response:$exchangeRates=json_decode($json,true);//Access the exchange rate values,e.g. GBP:echo $exchangeRates[‘quote’][‘USDGBP’]; Converting currency to another as follows: //set API Endpoint,access key,required parameters $endpoint=’convert’;$access_key=’MESSTONE_ACCESS_KEY’;from=’USD’;$to=’EUR’;$amount=10;//initialize CURL:$ch=curl_init(‘https://api.currencylayer.com/’.$endpoint.’?a cess_key=’.$access_key.’&from=’.$from.’&to=’.$to.’&amount=’.$amoumt.’ ‘);curl_setopt($ch, ,true);//get the(still encoded) JSON data:$json=curl_exec($ch);curl_close($ch);//Decode JSON response:$conversionResult=json_decode($json,true);//access the conversion result echo $conversionResult[‘result’];

Leave a comment