Hi, im coding a neopets trainer in vb6 and ive been making alot of progress due to the amount of tut's and guides available. I have just finished making my login using cheesies source code and Gluraks httpWRAPPER and it now logs in successfully or at least it says it does, then when i go to load the game(example is Extreme Herder) it loads game find but says "you are not logged it" and gives the options to 1)play game,2)sign in, or 3)sign up. I have many different http wrappers but i keep getting the same problem.
LOGIN CODE
Code:
Private Sub cmdLogin_Click()
cmdLogin.Enabled = False 'so the user doesn't click more than once
lblStatus.Caption = "Logging In (1/3)"
strHTML = Gluraks.GetWrapper("http://www.neopets.com/loginpage.phtml", "http://www.neopets.com/index.phtml")
lblStatus.Caption = "Logging In (2/3)"
strHTML = Gluraks.PostWrapper("http://www.neopets.com/hi.phtml", "destination=%2Findex.phtml&username=" & txtUser.Text, "http://www.neopets.com/loginpage.phtml")
lblStatus.Caption = "Logging In (3/3)"
strHTML = Gluraks.PostWrapper("http://www.neopets.com/login.phtml", "username=" & txtUser.Text & "&password=" & txtPass.Text & "&destination=%2Findex.phtml", "http://www.neopets.com/hi.phtml")
If InStrB(1, strHTML, "Location: /index.phtml") Then 'checks for successful login
lblStatus.Caption = "Successfully Logged In"
strHTML = Gluraks.GetWrapper("http://www.neopets.com/index.phtml", "http://www.neopets.com/hi.phtml")
lblStatus.Caption = "Parsing Account Details"
Label5(1).Caption = "Name: " & GB(strHTML, "Welcome, <a href=""/userlookup.phtml?user=", """")
Label6(1).Tag = GB(strHTML, "<a href=""/quickref.phtml""><b>", "</b></a> </td>")
If LenB(Label6(1).Tag) = 0 Then
Label6(1).Caption = "Pet(s): None"
Else
Label6(1).Caption = "Pet(s): " & Label6(1).Tag
End If
Label8(1).Caption = "Neo Cash: " & GB(strHTML, "NC: <a href='/mall/index.phtml'>", "</a>")
Label7.Caption = "NeoPoints: " & GB(strHTML, "NP: <a href=""/objects.phtml?type=inventory"">", "</a>")
cmdLogout.Visible = True
cmdLogin.Visible = False
cmdLogin.Enabled = True
lblStatus.Caption = "Logged In"
ElseIf InStrB(1, strHTML, "Location: /badpassword.phtml") Then 'checks for bad password
lblStatus.Caption = "Login Failed [Bad Password]"
cmdLogin.Enabled = True
ElseIf InStrB(1, strHTML, "FROZEN") Then 'checks if account is frozen
lblStatus.Caption = "Login Failed [Account Frozen]"
cmdLogin.Enabled = True
End If
End Sub LOAD GAME CODE(Extreme Herder)
Code:
Private Sub ExtremeHerder_Click()
On Error Resume Next
Dim strcode As String
lblStat.Caption = "Extreme Herder Loaded"
Dpage = Gluraks.GetWrapper("http://www.neopets.com/games/play_flash.phtml?va=&game_id=149&nc_referer=&age=1&hiscore=&sp=0&questionSet=&r=9894224")
Dpage = Replace(Dpage, """", "")
strcode = GetStringBetween(Dpage, "np8_loader", "'")
strcode = "http://images.neopets.com/games/gaming_system/np8_loader" & strcode
Me.SWF.Movie = strcode
Me.SWF.Play
End Sub