Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2002

    Unanswered: Live exchange rates


    I have three problems essentially based around the same issue.

    I have a webpage on my website which makes a call to a webpage on my merchant bank's website which retrieves the latest exchange rates for several currencies.

    The textual information comes back as:

    #Exchange rates for installation 99999
    #Fri Aug 01 22:13:22 GMT 2003

    I then have another page that has to use these currency rates to convert a fixed sum of money in pound sterling, say 80, and return a value in the other currencies.

    i.e., using the figures above, where GBP_USD = 1.6392034337924026

    the page needs to return a value of $131.14

    I am using Active Server Pages.

    ......query continued in next message........

  2. #2
    Join Date
    Dec 2002

    cont. message

    ...........continued message............
    The first question is: using ASP, can I make a call to my merchant bank's website just once a day, instead of making a call to it every time the page is opened or refreshed?

    Second question: How do I extract just the e.g. US$ value from the textual information I get from the bank above? - I need to parse it in some way but I don't know how.

    Third question: Using that parsed information, how do I then get the value of the exchange rate into a variable, which I can then go on to use?

    For example, what I tried was to place the figure of "1.6392034337924026" in an ASP file (remove all html and just have that 1.6392034337924026 figure) and name the file "ExchangeRateUSD.asp". In another page I tried retrieving that exchange rate figure and placing it in a variable by writing:

    .......continued message.........

  3. #3
    Join Date
    Dec 2002


    ...cont message.........

    [ code ]
    <% Dim strExchangeRate, strExchangeRateUSD
    strExchangeRate = 1
    strExchangeRateUSD = <!--#include file="ExchangeRateUSD.asp" -->%>
    <% strExchangeRate = strExchangeRateUSD%>
    [ / code ]

    which my PC really didn't like!

    If I can place the exchange rate I get from my bank into a variable, I will be able to work with it

    (sorry message was so long!!)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts