I'm using VB6, and I was wondering, what do I use to get data from a website? For example, like trying to connect to http://www.runescape.com/lang/en/aff/runescape/title.ws and getting how many people are playing.
Printable View
I'm using VB6, and I was wondering, what do I use to get data from a website? For example, like trying to connect to http://www.runescape.com/lang/en/aff/runescape/title.ws and getting how many people are playing.
In VB6, you can use the Internet Transfer Controls to perform a request against a web page to read the source out. You will then need to perform string manipulations to read a particular value from it.
You can also use the XMLHTTP class library to perform your request against a website.
Awesome, this looks easier than I thought it would be. I found this in a tutorial on Internet Transfer Controls:
I replaced that url with another one, but I got:Code:text1.text = inet1.OpenURL ("http://www.vbinformation.com/badclick.htm", icString)
I'm guessing this is because of the "inet1" part, where can I add that in, components?Quote:
Run-time error '424':
Object required
Look in "References". I don't use the VB6 IDE anymore but it may be under the "Project" menu option.
Actually it's under "Project"->"Components", and is called "Microsoft Internet Transfer control".
It will then be shown in the toolbox (along with textbox etc), and you will need to add one to your form (when you have, make sure the Name property is Inet1 to match the code).
Awesome, thank you very much guys, I found it :)