Source +httpwrapper is here VB6 Neo Programming Tutorial I: The Basics 1. Getting VB6 First you need vb6. To get it the most common but not legit way is torrents. Once you get vb6 look at some beggining tutorials. I am expecting you to know some vb6 before I teach you the way to program using http wrappers. Porgramin is NOT easy and computers are like a child learning something new you need to tell them everything. You will also need alot of asprin when your program dosn't work out. 2. Desing the Main Form Ok so open up vb6. Put a frame on your form in the top left corner. In the frame put a label and the caption of th label will be username. Then, add a textbox and call it txtusername. Below the label that says username put another label that says "Password". Beside it put a textbox called txtpassword. Below the txtpassword text box put a button which is call cmdlogin. The caption Should be login. Then get an http wrapper here Go back to your vb6 project and click on ctrl+d and wher you put the http wrapper click on it then press on ctrl+d again and slect the stuff module. Press control+d to add the stuff module. Then click on the little form with a pencil on it and add it to your from. That is the http wrapper and call it httpwrapper. This is what your form should look likeNote: There will be a grey box where you put your http wrapper. 3. Codeing your button put this code in form 1's code delete EVERY line of code and put this Code (Text): 'Varibles you will need 'If a varible is to be used in 2 or more sybs or function then make it public Public strhtml As String Public bollogin As Boolean Private Sub cmdlogin_Click() 'Sees if username text box is empty If Len(txtusername.Text) <= 0 Then 'If it is empty Then it gives an Error MsgBox "Please enter a username." Exit Sub End If 'Sees if password is empty If Len(txtpassword.Text) <= 0 Then 'if it is it gives an error MsgBox "Please enter a password" End If 'Gets the login function Call Login(txtusername.Text, txtpassword.Text) 'If login good If logintrue = True Then 'Tells you MsgBox "Loged In" 'if bad Else 'Tells you MsgBox "Not Logged In" End If End Sub 'Login function Public Function Login(Username As String, Password As String) 'This is the line of code that logs you in 'The first url is the url to send data to 'The words between the two url's are the data it is sending 'The last url is the place that you come from when you actually do it strhtml = httpwrapper.Postwrapper("http://www.neopets.com/login.phtml", "username=" & Username & "&password=" & Password & "&destination=%2Fpetcentral.phtml", "http://www.neopets.com/hi.phtml") 'If there was a bad password If InStr(1, strhtml, "badpassword") <> 0 Then MsgBox "You entered an invalid username/password combination!" & vbNewLine & "Please try again.", vbCritical, "Login Failure" 'This boolean tells you if the login was sucessfuly bollogin = False 'If you have been iced ElseIf InStr(1, strhtml, "This account has been") <> 0 Then MsgBox "ACCOUNT FROZEN!" & vbNewLine & "Please use another.", vbCritical, "Login Failure" 'Makes the Login sucsess boolian false meaning the login was bad bollogin = False Exit Function 'If you have tried to guess the passwrod two often ElseIf InStr(1, strhtml, "too many times") <> 0 Then MsgBox "You have tried to guess the password to many times in the last hour!" & vbNewLine & "Try again later.", vbCritical, "Login Failure" 'Makes the Login sucsess boolian false meaning the login was bad logintrue = False Exit Function 'Sees if there was a bab url ElseIf InStr(1, strhtml, "Error 404 : Missing Page Alert") <> 0 Then 'Makes the Login sucsess boolian false meaning the login was bad logintrue = False Exit Function 'If none of the errors come up the login is good Else logintrue = True End If End Function And there you go. Your're first self made login. Next tutorial: Manipulation of source: The main thing you need to do +rep if this helped Tutorials done 1/7 If you get any errors tell me
So.. How can we make a list box, say, "Has logged into account *******" Like some other programs do? I am making a Battle dome, and avatar grabber. I want to log in using this. When it logs in can it add into a text box, Succesfully logged into ****** Or Failed to log into ***** in the side textbox?
this is the first of alot of tutorials I am just starting the next one. Source code mnaullation/crash course
hey great guide, i used it except that http wrapper link didn't work oh and btw you might wanna spellcheck a bit too: boolian = boolean bab = bad passwrod = password "guess the passwrod two often" = guess the password too often sucsess = success sucessfuly = successfully Varibles = variables
nah i got it to work but Stupid thing doesnt want to work here strhtml = httpwrapper.Postwrapper("http://www.Filtered Link - For the safety of our users please do not post direct links to Neopets./login.phtml", "username=" & Username & "&password=" & Password & "&destination=%2Fpetcentral.phtml", "http://www.Filtered Link - For the safety of our users please do not post direct links to Neopets./hi.phtml")
you need the .text thingie's after username and password! strhtml = httpwrapper.Postwrapper("http://www.Filtered Link - For the safety of our users please do not post direct links to Neopets./login.phtml", "username=" & Username.text & "&password=" & Password.text & "&destination=%2Fpetcentral.phtml", "http://www.Filtered Link - For the safety of our users please do not post direct links to Neopets./hi.phtml") try that!
then it wants me to replace it ill try that and try to go around the error EDIT: im going to make it on the same thing im just going to make it with out a sub form
Wow! Thanks! I'm very new at this, but that's helping alot. So, um...dumb question, what's the purpose of a httpwrapper?
you know how some programs show you the amount of NP and your active pet when you log in? what's the code for that?
I have the code for it, It uses the most used function when writing a neopet program getstringbetween but that is not included in vb. I now recomend not to use vb6 but rather vb.net. It is free a little more code but alot easier to look at and debug. I am making a site with .net tutorials and if you want I'll pm you the link when I get done with it