I will teach you how to make a gaia online login using VB.NET. I currently have VB2008 installed so that is what I will use for this tut. If you have VB2005 or 2003 then some of the directions might be different.
Ok, firstly download this
wrapper and just leave it for now.
Open VB, then go to File -> New Project. Select Windows Forms Application and name it whatever you want, I'll name mine GaiaLoginExamp.
Now a form should appear and on the left side you should see a box called 'Toolbox'. Select textbox and make two. Under them make one button.
Now you have to name the stuff. Name the first textbox username. Name the second textbox password. And name the button Login, also if you want you can change the text for the button to something like Login.
Double click on the button and code should appear.
Save everything and if you are using VB2008 a box should appear. Remember the location, copy it and go to the folder. And of course click save.

If you're in the folder right now then get the wrapper and unzip it in the folder called GaiaLoginExamp or whatever you named your project as.
Go back to visual studio and go to Project -> Add Reference. Click browse and you should see 5 .dlls. Select them all and click Ok.
Now we need to include the wrapper files, go to Project -> Add Existing Item.. You need to select 5 files and they are; Sleepmodule.vb, Stuff.vb, wrapper.designer.vb, wrapper.resx, wrapper.vb. When you selected these click add. We have setup the wrapper, now we just need to declare it and write the code.
Under "Public Class Form1" write this; Public Wrapper As HTTPWrapper = New HTTPWrapper
This declares that 'wrapper' is using the class HTTPWrapper. So now we can use the wrapper fully.
Now we can write the code for the login because we set up the wrapper. Under 'Private Sub Login_Click', paste this code
Code:
'This declares the strHTML as a string
Dim strHTML As String
'This if statement check if the username textbox OR the password textbox is Null(empty)
'IF it is then it shows a message box saying that the textbox is empty then it exits the login with 'Exit Sub'
If username.Text = vbNullString Or password.Text = vbNullString Then
MessageBox.Show("You left the username or/and password field blank." & vbNewLine & "Try again..")
Exit Sub
End If
'this disables the two textboxes and the button so the user can't change them or click the button again.
username.Enabled = False
password.Enabled = False
Login.Enabled = False
'Now if no textboxes are Null then the program POSTs to Gaia with the username and password
'when the wrapper posts the string strHTML will have the source of the page after the post
strHTML = Wrapper.PostWrapper("login.gaiaonline.com/gaia/login.php", "username=" & username.Text & "&password=" & password.Text & "&frob=&token=&redirect=http%3A%2F%2Fwww.gaiaonline.com%2F&chap=", "http://gaiaonline.com")
'This if statement looks at the strHTML string and checks IF strHTML contains the string "Location: http://www.gaiaonline.com/?login_success=1"
'If it does contain that string that means that the login worked and the user has logged in
'BUT if it doesn't contain that string then it means that the login failed so the user will have to try again.
If strHTML.Contains("Location: http://www.gaiaonline.com/?login_success=1") Then
MessageBox.Show("Logged in!!")
Else
MessageBox.Show("Login Failed")
'And we re enable the textboxes and buttons so the user can login again
username.Enabled = True
password.Enabled = True
Login.Enabled = True
End If It has comments on everything so you can understand everything. This is how it should look now:
Save everything and now we can tryout the login. Go to Debug -> Start Debugging
Your form should appear, now enter a gaia online username and password if everything is setup right you should get this:
If it worked then congratulations! You have created a VB.NET gaia login
Credits
Kane - for the wrapper.