![]() A nice feature that is provided is the ability to set the rate that you want to calculate at which time it will display a range of historical data to show the trends over the long term. It easily calculates about 30 international currencies, automatically receives updates on changes in exchange rates and is far more convenient to use than many of the online currency calculators available. Return (float) $exchange_rate * 1.0 // change 1.Desktop Currency Converter is free online currency calculator simple to use and always available. Public static $_url = '', $currencyTo, $url) Įcho 'Cannot retrieve rate from Yahoofinance' I use a php-class to convert currency rates: /** ?q=select * from where pair in ("USDLTL") decoded URL which is easier to read looks like this: then you will get huge number like 12500000.xxx so make math to get the ratio you need: 1/12500000 and you will get ratio = 0.00000125 you got that the rate is from KRW to EUR 0.0006 but the real rate is something like 0.00000125 so ask API again, just flip the currencies: what is the ratio from EUR to USD. Use yahoo api: *%20from%%20where%20pair%20in%20(%22USDLTL%22)&format=json&env=store:///alltableswithkeys&callback=Ĭheck out in the URL there is USDLTL now, so just change to what you need.Īlso sometime the rate is so low, that you don't see it even with 4 numbers it shows:ĭo not panic just make a reversal query, flip your currencies and make some simple math.Į.g. Leaving this legacy answer just to provide information that this doesn't work anymore. UPDATE: Yahoo API is not working anymore.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |