We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Populating global vars from a regularly updated csv?

Development and Programming

Paul_B's avatar
Paul_B
86 posts
14 years ago
Paul_B's avatar Paul_B

Hi - I’m looking to use some exchange rate data (relative to GBP) that needs to be up to date, and one way I thought I might be able to do this is taking a csv feed from yahoo and parsing it to update some global vars, using a cron to grab the csv and run a script every 12 hours or so…

http://download.finance.yahoo.com/d/quotes.csv?s=GBPUSD=X+GBPEUR=X+GBPCAD=X+GBPAUD=X&f=nl1d1t1

I get a csv formatted like this:

"GBP to USD",1.5815,"10/14/2011","5:55pm"
"GBP to EUR",1.1397,"10/14/2011","5:55pm"
"GBP to CAD",1.5977,"10/14/2011","5:55pm"
"GBP to AUD",1.5289,"10/14/2011","5:55pm"

The issue I have is that now I’m not sure what to do with it(!) - ideally I’d like to end up with some globals like {USDrate}, {CADrate} that return the relevant exchange rate. Any advice on how to do this would be really appreciated.

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.