Candrias77
11-06-2003, 11:18 PM
Hi there, I am using World Pay to do the final Credit Card processing for a client. I would like to change all the prices on the site to match the currency that is selected by the user. This is simple enough if I have the conversion rates... that's where it get's interesting.
If I type this into my browser:
https://select.worldpay.com/wcc/info?op=rates&instId=ourID
Then the following text is returned:
#Exchange rates
#Thu Nov 06 23:06:19 GMT+00:00 2003
NZD_NZD=1.0
NZD_EUR=0.5436378022267444
NZD_USD=0.6265429874209774
etc.
etc.
etc.
Now I figure if I could set this returned data as a string then I can explode() it and find the variables I need.
I have never worked with opening external files before, when I try to read this file with fopen() I get a 'no such file or directory' error. Is there a speical way of calling in a text file?
Thanks for your help, any recomendations are appreciated.
If I type this into my browser:
https://select.worldpay.com/wcc/info?op=rates&instId=ourID
Then the following text is returned:
#Exchange rates
#Thu Nov 06 23:06:19 GMT+00:00 2003
NZD_NZD=1.0
NZD_EUR=0.5436378022267444
NZD_USD=0.6265429874209774
etc.
etc.
etc.
Now I figure if I could set this returned data as a string then I can explode() it and find the variables I need.
I have never worked with opening external files before, when I try to read this file with fopen() I get a 'no such file or directory' error. Is there a speical way of calling in a text file?
Thanks for your help, any recomendations are appreciated.