Putting in URLs

Discussion in 'Code Snippets and Tutorials' started by Fexxel, Mar 18, 2009.

  1. Fexxel

    Fexxel Level IV

    Joined:
    Jan 28, 2009
    Messages:
    959
    Likes Received:
    26
    So I'm attempting to make this program. It's a Sponsor Doer. There is a problem I have to see though. I don't know how to make VB visit a link.
    So far from billy I know the following:
    Code (Text):
    1. dim w as new rickyswrapper
    2. dim strhtml as string = w.getreqest(url, referrer)
    So... url is the url I want to visit. IE: http://www.neopets.com/objects.phtml
    So I'd do:
    Code (Text):
    1. dim w as new rickyswrapper
    2. dim strhtml as string = w.getreqest(http://www.neopets.com/objects.phtml, http://www.neopets.com)
    Correct?
    Some other questions:
    1. I understand that the first line is assigning w to rickyswrapper, but why is it being assigned "rickyswrapper"? I mean, I'm using Mythic Wrapper right now. I don't really get that.
    THANKS!
    Fexxel
     
  2. tharoux

    tharoux Level IV

    Joined:
    Dec 30, 2006
    Messages:
    2,733
    Likes Received:
    126
    Location:
    In front of my PC, Montreal
    first, you need to declare the wrapper (doing dim w as new rickyswrapper)
    The thing tho is that you must input the name of your wrapper class where "rickyswrapper" is.
    If the class is TCPWrapper, then, you put "dim w as new TCPWrapper". And just FYI, you're not assigning w to "rickyswrapper" but "rickyswrapper" to w.

    Next, I'm pretty sure everything needs to be between quote in "dim strhtml as string = w.getrequest(url, referrer)".
    So using the wrapper assigned to w, we do
    dim strhtml as string = w.getrequest("http://www.neopets.com/objects.phtml", "http://www.neopets.com")
    Now, strhtml contains the response (web coding) and you can process it.

    Now, the referer will NEVER be "http://www.neopets.com" once you're logged in. Be sure to use the proper referer.
    If you just logged on, it's "http://www.neopets.com/index.phtml".

    And since I'm feeling generous (and the fact that I already published this), I'll give you my wrapper with a simple login form so you can learn a bit. It's the basic if you want to program apps in vb. Written in vb.net 2008.

    If you have more Qs, lemme know ! ;)
     
  3. Fexxel

    Fexxel Level IV

    Joined:
    Jan 28, 2009
    Messages:
    959
    Likes Received:
    26
    THANK YOU SOOO MUCH! I LOVE YOU!!!! +Rep'd
    If I have more Qs, I'll post em. Thanks SOOO much! Off to go try this out.