Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Jun Tangunan
  Where is Jun Tangunan?
 Cabanatuan
 Philippines
 Jun Tangunan
 To: Saifuddin Hussain
  Where is Saifuddin Hussain?
 Dubai
 United Arab Emirates
 Saifuddin Hussain
 Tags
Subject: RE: Update Exchange Rate
Thread ID: 416417 Message ID: 416486 # Views: 41 # Ratings: 1
Version: Visual FoxPro 9 SP2 Category: Forms
Date: Tuesday, December 30, 2014 7:38:48 AM         
   


> Hi,
>
> Is is possible to update exchange rate online and place it in a text box using command button to update.
>
> like;
>
> US$: 1.00 = Dhs.3.6732
> ..
> ..
>
> I want 3.6732 in text box. Is it possible?
>
> Saifuddin


You can employ XMLHttpRequest. That will allow you to get the html codes from the web down to your local drive, into a file. See sample codes here which I use for our weather forecasting. You can employ the same on rates: http://sandstorm36.blogspot.com.au/2014/04/localized-data.html

Then you can put that locally stored file into a string later via FILETOSTR(), get the data you need via via STREXTRACT(), and put the result onto your object on form.

I employ the same for our exchange rates monitoring utilizing a timer, so we can decide for the best date to send money back home. Rates come from different websites, and is updated every minute by a timer:



Now, depending on the speed of your internet access, you may encounter lags when downloading the data. Learn then to utilize a support app like this: http://sandstorm36.blogspot.com.au/2012/11/run-vfp-app-like-service.html


https://vfpx.codeplex.com/releases/view/99045
http://sandstorm36.blogspot.com

ENTIRE THREAD

Update Exchange Rate Posted by Saifuddin Hussain @ 12/29/2014 11:49:37 AM
RE: Update Exchange Rate Posted by Mike Gagnon @ 12/29/2014 11:57:35 AM
RE: Update Exchange Rate Posted by Shaheryar Rashed @ 12/30/2014 7:16:41 AM
RE: Update Exchange Rate Posted by Jun Tangunan @ 12/30/2014 7:38:48 AM