Click to See Complete Forum and Search --> : Getting info from a website? VB6
MountainDew7
Jun 6th, 2008, 03:03 PM
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.
mendhak
Jun 6th, 2008, 03:34 PM
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.
mendhak
Jun 6th, 2008, 03:35 PM
You can also use the XMLHTTP class library to perform your request against a website.
MountainDew7
Jun 6th, 2008, 03:59 PM
Awesome, this looks easier than I thought it would be. I found this in a tutorial on Internet Transfer Controls:
text1.text = inet1.OpenURL ("http://www.vbinformation.com/badclick.htm", icString)
I replaced that url with another one, but I got:
Run-time error '424':
Object required
I'm guessing this is because of the "inet1" part, where can I add that in, components?
mendhak
Jun 6th, 2008, 04:00 PM
Look in "References". I don't use the VB6 IDE anymore but it may be under the "Project" menu option.
si_the_geek
Jun 6th, 2008, 04:11 PM
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).
MountainDew7
Jun 6th, 2008, 04:12 PM
Awesome, thank you very much guys, I found it :)
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.