Hi,
I am required to synchronize my clients site’s pricing with the same exchange rates employed by the cc processing company (WorldPay). Unfortunately their integration guide gives no real guidance on how to achieve this.
Basically they provide an url (https://select.worldpay.com/blahblah)which returns a text file like the one below containing the current rates.
#Exchange rates for installation 1234
#Fri Oct 01 15:53:51 GMT 2000
DEM_CHF=0.8293301380534893
DEM_NLG=1.1267390120015601
DEM_DEM=1.0
DEM_CAD=0.7811273640705966
rateDateString=1999-10-01
DEM_BEF=20.625463396943164
rateDateMillis=938736000000
allRatesCurrent=true
DEM_FRF=3.353854814359919
DEM_GBP=0.3364112383046616
What I need to be able to do is, at a certain time each day, get the current rates an put them in a table in my DB. Something like
Currency....Rate
CHF....0.8293301380534893
NLG....1.1267390120015601
I know this has something to do with cron and fopen but if anybody could provide any specifics or general guidance I (and the many other people who ask me the same question) would be sooo gratefull..this really is a showstopper for me
P.S The property name=value lines are generated in a random order so I cannot rely on any particular ordering of the items.
Platform
Linux\Apache
PHP 4.03
MySQL 3.23.32
Have telnet
Thanks
Stephen Moran