VB6 log in help

Discussion in 'Code Snippets and Tutorials' started by Coconuts, Dec 13, 2006.

  1. Coconuts

    Coconuts Newbie

    Joined:
    Nov 18, 2006
    Messages:
    8
    Likes Received:
    0
    this is my code:

    Private Sub Command1_Click()
    Winsock1.Connect "www.neopets.com", "80"
    End Sub

    then on winsock_connect I have some GET's such as viewing pet pound and money tree etc..

    then this is my get data

    Private Sub Winsock1_DataArrival(ByVal bytesTotal As Long)
    Winsock1.GetData data, vbString
    datax.text = datax.text & data
    End Sub

    but when I view it turns out like this:

    HTTP/1.1 302 Found
    Date: Wed, 13 Dec 2006 01:01:07 GMT
    Server: Apache/1.3.33 (Unix) mod_gzip/1.3.26.1a PHP/4.3.10
    X-Powered-By: PHP/4.3.10
    Set-Cookie: neodebug=deleted; expires=Tue, 13-Dec-05 01:01:06 GMT; path=/; domain=.neopets.com
    Set-Cookie: nupi=0; expires=Tue, 12-Dec-06 23:21:07 GMT; path=/; domain=.neopets.com
    Set-Cookie: nupid=0; expires=Tue, 12-Dec-06 23:21:07 GMT; path=/; domain=.neopets.com
    Set-Cookie: npid=0; expires=Tue, 12-Dec-06 23:21:07 GMT; path=/; domain=.neopets.com
    Expires: Mon, 26 Jul 1997 05:00:00 GMT
    Last-Modified: Wed, 13 Dec 2006 01:01:07 GMT
    Cache-Control: no-cache, must-revalidate
    Pragma: no-cache
    p3p: policy="http://www.neopets.com/privacy.p3p", CP="CURa ADMa DEVa TAIa OUR BUS IND UNI COM NAV INT"
    Set-Cookie: neoremember=testest; expires=Thu, 15-Mar-07 15:14:27 GMT; path=/; domain=.neopets.com
    Set-Cookie: wc_ids=0; expires=Mon, 11-Sep-06 10:47:47 GMT; path=/; domain=.neopets.com
    Set-Cookie: neologin=testest%2Bc8e8b9cad90a4e17978913190389c646; expires=Thu, 13-Dec-07 01:01:07 GMT; path=/; domain=.neopets.com
    Set-Cookie: toolbar=testest%2BC%2B400c04391e187e03ef3a280c71e42d65; expires=Thu, 15-Mar-07 15:14:27 GMT; path=/; domain=.neopets.com
    Set-Cookie: np_randseed=84121-8471886203768; expires=Tue, 23-Jan-07 17:01:07 GMT; path=/; domain=.neopets.com
    Set-Cookie: cachetimer=456de9f0b9cf864e63c8a0a4e3b70d75; expires=Thu, 15-Mar-07 15:14:27 GMT; path=/; domain=.neopets.com
    Set-Cookie: np_randseed=91484-198587155192; expires=Tue, 23-Jan-07 17:01:07 GMT; path=/; domain=.neopets.com
    Set-Cookie: np_randseed=66721-16294169583383; expires=Tue, 23-Jan-07 17:01:07 GMT; path=/; domain=.neopets.com
    Location: http://www.neopets.com/randomfriend.phtml?user=test
    Connection: close
    Content-Type: text/html; charset=UTF-8

    this looks more like the cookie, I want actual html, anyone know what I am doing wrong?
     
  2. expon

    expon Administrator
    Staff Member

    Joined:
    Oct 30, 2006
    Messages:
    1,393
    Likes Received:
    56
    Location:
    UK
    can you show us what your GET request looks like? you also might want to consider downloading the vb6 login example from the dl section and using a wrapper instead.
     
  3. kane

    kane Newbie

    Joined:
    Jan 14, 2007
    Messages:
    6
    Likes Received:
    0
    Try using httpwrapper or ripperwrapper :| alot easier.
     
  4. Pankirk

    Pankirk Level III

    Joined:
    Nov 12, 2006
    Messages:
    652
    Likes Received:
    28
    Location:
    America
    Yeah HTTP wrapper is what I use and it is alot easier then that. Try this.

    make a textbox named "textuser" and another textbox named "textpassword" (excluding the speech marks of course) then make a command button (named anything you want) and put that code in it. And if you did it right then you'll be logged in.

    EDIT: You also have to get the http wrapper (added for you at the bottom) and drag it in your project and name it "WRAPPER" and also add the .bas files too.

    download http wrapper:
    http://www.filefactory.com/file/cbe54e/
     
  5. Ryan

    Ryan Level II

    Joined:
    Jan 23, 2007
    Messages:
    251
    Likes Received:
    1
    Do you buy items using the wrapper as well?
    Just with different field names?
     
  6. Pankirk

    Pankirk Level III

    Joined:
    Nov 12, 2006
    Messages:
    652
    Likes Received:
    28
    Location:
    America
    what do you meen "buy" items... If your talking about making an aber then I think you should start off by trying something smaller. Try making an avatar grabber first then work your way up to something bigger. But yes that is what you would use if you wanted to buy something. except you would put a different link in.
     
  7. Coconuts

    Coconuts Newbie

    Joined:
    Nov 18, 2006
    Messages:
    8
    Likes Received:
    0
    Hmm, Can you reupload http wrapper please? It seems to have expired :(