+ 1

How can l save exchange rates directly to the database?

l need get exchange rates from any website who has the rates and save special one to the database field which l want to store it. How to get the information and how to refresh database automatically?

7th Jun 2018, 8:37 AM
Cihan Ukan
Cihan Ukan - avatar
1 Réponse
+ 2
Just create a shell program that does following: - Curl information from openexchangerates website doc @ https://docs.openexchangerates.org/ - Parse the data retrieved according to your format and create a nice insert/update SQL statements from it - Fire up your insert/update SQL statements into your database You need to register your shell script in your cron schedule so that your script run automatically at specified time hourly | daily | monthly .... But make sure you don't exceed your curl request more that free limits provided by the openexchangerates site.
8th Jun 2018, 1:12 PM
Gopal Gautam
Gopal Gautam - avatar