|
-
Jun 6th, 2008, 03:03 PM
#1
Thread Starter
Member
Getting info from a website? VB6
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.
-
Jun 6th, 2008, 03:34 PM
#2
Re: Getting info from a website? VB6
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.
-
Jun 6th, 2008, 03:35 PM
#3
Re: Getting info from a website? VB6
You can also use the XMLHTTP class library to perform your request against a website.
-
Jun 6th, 2008, 03:59 PM
#4
Thread Starter
Member
Re: Getting info from a website? VB6
Awesome, this looks easier than I thought it would be. I found this in a tutorial on Internet Transfer Controls:
Code:
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?
-
Jun 6th, 2008, 04:00 PM
#5
Re: Getting info from a website? VB6
Look in "References". I don't use the VB6 IDE anymore but it may be under the "Project" menu option.
-
Jun 6th, 2008, 04:11 PM
#6
Re: Getting info from a website? VB6
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).
-
Jun 6th, 2008, 04:12 PM
#7
Thread Starter
Member
Re: Getting info from a website? VB6
Awesome, thank you very much guys, I found it
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|