Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting data stream from internet.

Status
Not open for further replies.

tedsmith

Programmer
Nov 23, 2000
1,762
AU
I am confused (as usual) about exactly how to hook up (hopefully) a winsock to receive a data stream coming from a remote website (in order to observe changes in incoming data in my vb6 app).

We have a public transport provider that provides a stream on the web of data representing the info and GPS location of it's buses at any time. This is used by electronic ticketing and vehicle management. They have given me the web address of this "stream" as they call it to see if I can integrate it with some old VB6 apps they use. (Nobody in the organisation understands VB6 anymore - they apparently all have died of old age!

When I simply open a browser on the site I get a small file of about 20k of information that I can save to a file and inspect. This contains all the info from all the trains or buses and is updated every minutes. It is simply bytes that represent various parameters of the bus something like a database converted to text so I can easily decode it.

How can I get this data direct without having to save it as a file so changes automatically happen on my screen?

I have seen lots of examples on how to use the web and to read similar databases but not how bring them together.
 
Um ... have you looked at the Microsoft Internet Transfer Control?
 
I wouldn't bother with the creaky old ITC/WinInet Control anymore. Windows has shipped with several superior HTTP client classes for quite a long time now, each with its own set of advantages and disadvantages. But for HTTP GET you can also just use the AsyncRead method built into VB6's UserControl infrastructure.

It is simply bytes that represent various parameters of the bus something like a database converted to text so I can easily decode it.

Which is it? Bytes or text?

Seems odd for them to call this a stream. But perhaps it is and your browser fell back to a simple request. Perhaps you'll need to implement WebSockets, Comet/Long Polling, etc. yourself.

Surely they have more specs than just a URL?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top