Is it possible to update your programs information from other websites? I mean if you have like a stock program or currency program, the data changes everyday. So can you recieve updates from websites, and change this info? If so could you point me to a site that explains how, or some kind of api that can achieve this?

Recommended Answers

All 5 Replies

Yes you can, but it is likely against the accaptable use policy of the site.

What you'd have to do is use an HttpURLConnection to retrieve the page containing the data you want and extract that which you want.

A more appropriate solution is to contact the site owners and ask whether they have data available for download.
They will likely charge a fee for this or tell you to contact their supplier (as most sites get the data from elsewhere and do have to pay for it).
On getting permission you'll then be given a place to download the data and a description of the data format which you can then use to create a parser for it.

The same system can be used for other data as well.
For example, when working for a major bank I built software to download stock quotes, charts, economic news items, etc. etc. from various sources for consolidation on their website.

Thank very much. That was EXTREMELY helpful. I checked out this one site, and it turns out you do have to pay for it.

what about reading the source code of the web site using a url connection..I think you could get the info you want like that, but it would probably be very hard..What do you think?

it can be done.
Reading the data itself isn't hard, the hard part is finding out what part of the data is the relevant part for you (and if they're as sneaky as we were they change the html regularly to make it impossible to automate the process).
It would be tantamount to stealing as well.

They have to pay for that data too, so it's only natural they want others using the data to pay as well.

I was afraid they would change it every day...Since I was just going to do this for fun, I guess I won't worry about it. As you said, it's probably the equivilent of stealing..

Thanks for all your help.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.