automatic updating --- getting info from websites
I'm working on this currency converter right now. The exchange rate for currency changes everyday, and I thought it would be a cool addition to have it update automatically to whatever a website said the exchange rate was...Is this possible to get a connection to a website and recieve updates like that?
Re: automatic updating --- getting info from websites
I asked the same on this site a long time ago and never got an answer. What i wanted to do was get information in real time like a stocks price as it fluctuates throughout the day.
Re: automatic updating --- getting info from websites
Re: automatic updating --- getting info from websites
Are there no RSS feeds that you could link to to get up to date exchange rate information? linking to one of these would be straight forward enough, then you just have to deal with an XML document?!
Re: automatic updating --- getting info from websites
I only did a quick scan on teh web, but XE.com have such a service:
http://www.xe.com/dfs/sample-gbp.xml that is a link to there GBP exchange rate, it would be pretty easy to parse, unfortunately you have to pay for the real feed, but it is possible...
Hope that helps
Andy
Re: automatic updating --- getting info from websites
I check it out. It looks like you need a HttpURLConnection object. But, as andy hollywood metioned, you have to pay for the initial feeds. :cry:
Re: automatic updating --- getting info from websites
You could, of course, attempt to parse some other site for the information, but it's hard to find what you want.
Re: automatic updating --- getting info from websites
are you saying that I can just use a url connection and read the source code? If so, I might try that. Will the updates be in the source code?
Re: automatic updating --- getting info from websites
Yes, they will, but getting them will be the problem.
Re: automatic updating --- getting info from websites
I just saw what you meant, it doesn't look like the easiest thing!
Re: automatic updating --- getting info from websites
Since they make people pay for this, I'm guessing they change their html code every day to keep people like me from using it.