Results 1 to 7 of 7

Thread: Getting info from a website? VB6

  1. #1

    Thread Starter
    Member
    Join Date
    May 2008
    Posts
    36

    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.

  2. #2
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    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.

  3. #3
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: Getting info from a website? VB6

    You can also use the XMLHTTP class library to perform your request against a website.

  4. #4

    Thread Starter
    Member
    Join Date
    May 2008
    Posts
    36

    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?

  5. #5
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    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.

  6. #6
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    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).

  7. #7

    Thread Starter
    Member
    Join Date
    May 2008
    Posts
    36

    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
  •  



Click Here to Expand Forum to Full Width