Go Back   Gaming Gutter > Non-Gaming > Programming > Tutorials


Tutorials - Looking for programming tutorials to increase your knowledge? Do so here.

» Site Navigation
» Home
» FAQ
» Log in
User Name:

Password:

Not a member yet?
Register Now!
» Advertisement
» Recent Threads
Go to first new post HAY GUIZ, Y WAS THE PEDO...
Today 02:53 PM
by Ruzzeh
Last post by Vaginal-Milkshake
Today 04:29 PM
162 Replies, 163 Views
Go to first new post SO IM IP BANNED.
Today 10:25 AM
Last post by qtpie
Today 04:29 PM
4 Replies, 5 Views
Go to first new post i thought this was funny...
Today 04:21 PM
Last post by Ruzzeh
Today 04:29 PM
6 Replies, 7 Views
Go to first new post neoboard spamming
Today 04:18 PM
by aca24
Last post by Ruzzeh
Today 04:27 PM
8 Replies, 9 Views
Go to first new post ~~SEEKING certain PETS~~
Today 04:27 PM
Last post by Jmathias_91
Today 04:27 PM
0 Replies, 1 Views
Reply
 
LinkBack Thread Tools Display Modes

 Making A Simple Login. (Vb6)
Old 05-07-2007, 03:47 PM   #1 (permalink)
omgcat omgcat is offline
I raep babies.
 
omgcat is offline
Join Date: May 2007
Posts: 61
iTrader: 0 / 0%
omgcat Is gaining popularity
Rep Power: 5
Making A Simple Login. (Vb6)

Ill give you some of the code to make a easy login... You will code the rest!


Ok. first thing to do is add the http wrapper, and moduels into the program.. or else it wont compile right!

Make a textbox, label it txtuser, make another one right under it and label it txtpass.

After you have done this, make a button.. label the button cmdlogin.


After you have done this, Use this code.. I will break it up into pieces.. so you can understand it. (take out the spaces)






Code:
Private Sub cmdLogin_Click()
Dim strHTML As String
strHTML = w.PostWrapper("http://neopets.com/login.phtml", "username=" & txtuser & "&password=" & txtpass & "&destination=%2Fpetcentral.phtml", "http://neopets.com/hi.phtml")
If InStr(1, strHTML, "badpassword") Then
msgbox "Bad Password for account " & txtuser.Text
ElseIf InStr(1, strHTML, "This account has been") Then
msgbox "The account " & txtuser.Text & " has been frozen"
ElseIf InStr(1, strHTML, "petcentral") Then
msgbox "Logged in as " & txtuser.Text
Ok the first part is this:

Code:
Dim strHTML As String
strHTML = w.PostWrapper("http://neopets.com/login.phtml", "username=" & txtuser & "&password=" & txtpass & "&destination=%2Fpetcentral.phtml", "http://neopets.com/hi.phtml")
This part of the code is telling the wrappper (httpwrapper) to go to the neopets website and put in the parts of text it needs to log in. This is what it does.. in example if the txtuser is omgcat and the txtpass is omgcat

http://neopets.com/login.phtml/usern...tcentral.phtml

Code:
If InStr(1, strHTML, "badpassword") Then
msgbox "Bad Password for account " & txtuser.Text
ElseIf InStr(1, strHTML, "This account has been") Then
msgbox "The account " & txtuser.Text & " has been frozen"
ElseIf InStr(1, strHTML, "petcentral") Then
msgbox "Logged in as " & txtuser.Text
This is telling the program to search the page and look for the words. and if it finds the specific word it will tell you if it has logged in or not.

You have successfully made a login.
  Reply With Quote

 
Old 05-07-2007, 11:24 PM   #2 (permalink)
second2none second2none is offline Gender Male
Underground
 
second2none is offline
Join Date: Sep 2006
Location: BrisBANE <----
Age: 19
Posts: 5,025
iTrader: 1 / 100%
second2none Is a Party Captainsecond2none Is a Party Captainsecond2none Is a Party Captain
Rep Power: 15
With txtUser & txtPass you should make them. txtUser.Text & txtPass.Text.. thats all im gonna say. Not the best tutorial lol.
__________________
This is from:
Screenies Of A Mod
Code:
How did you do it? FLP , jotform, some other form of hacking? - First Class Noob
Lawl.. funny shit.

Quote:
Originally Posted by Kore
By k[ore] on Today, 08:44 AM
i'll give you rep alright, but it won't be positive.
Lawl Ownt

Hoes forgot to eat a dick and shut the FUCK UP!
  Reply With Quote

 
Old 05-08-2007, 07:22 AM   #3 (permalink)
omgcat omgcat is offline
I raep babies.
 
omgcat is offline
Join Date: May 2007
Posts: 61
iTrader: 0 / 0%
omgcat Is gaining popularity
Rep Power: 5
Quote:
Originally Posted by Dooper View Post
With txtUser & txtPass you should make them. txtUser.Text & txtPass.Text.. thats all im gonna say. Not the best tutorial lol.

txtuser and txtpass both work.. Been using them since I started programming lol. I dont get any mismatch errors either o.o
  Reply With Quote

 
Old 05-08-2007, 11:34 PM   #4 (permalink)
second2none second2none is offline Gender Male
Underground
 
second2none is offline
Join Date: Sep 2006
Location: BrisBANE <----
Age: 19
Posts: 5,025
iTrader: 1 / 100%
second2none Is a Party Captainsecond2none Is a Party Captainsecond2none Is a Party Captain
Rep Power: 15
So.. the proper way is to put .text, You will get errors. Just cause you dont.. doesnt mean other people wont & then they wont know what to do.
__________________
This is from:
Screenies Of A Mod
Code:
How did you do it? FLP , jotform, some other form of hacking? - First Class Noob
Lawl.. funny shit.

Quote:
Originally Posted by Kore
By k[ore] on Today, 08:44 AM
i'll give you rep alright, but it won't be positive.
Lawl Ownt

Hoes forgot to eat a dick and shut the FUCK UP!
  Reply With Quote

 
Old 06-21-2007, 10:54 PM   #5 (permalink)
thejurm thejurm is offline
Code Mazter Mike
 
thejurm is offline
Join Date: Jun 2007
Posts: 14
iTrader: 0 / 0%
thejurm Is gaining popularity
Rep Power: 0
I have some errors:
Error 1 Name 'w' is not declared. C:\Documents and Settings\HP_Administrator\Local Settings\Application Data\Temporary Projects\WindowsApplication1\Form1.vb 5 19 WindowsApplication1
Error 2 Operator '&' is not defined for types 'String' and 'System.Windows.Forms.TextBox'. C:\Documents and Settings\HP_Administrator\Local Settings\Application Data\Temporary Projects\WindowsApplication1\Form1.vb 5 67 WindowsApplication1
Error 3 'If' must end with a matching 'End If'. C:\Documents and Settings\HP_Administrator\Local Settings\Application Data\Temporary Projects\WindowsApplication1\Form1.vb 10 9 WindowsApplication1
Error 4 Statement cannot appear within a method body. End of method assumed. C:\Documents and Settings\HP_Administrator\Local Settings\Application Data\Temporary Projects\WindowsApplication1\Form1.vb 13 1 WindowsApplication1


Note that I am just now starting to use VB :o

--

Edit: My bad, it says take out the spaces

Last edited by thejurm; 06-22-2007 at 07:14 AM.
  Reply With Quote

 
Old 07-01-2007, 05:45 AM   #6 (permalink)
Connor Connor is online now Gender Male
 
Connor's Avatar
 
Connor is online now
Join Date: Dec 2006
Location: Preston
Age: 15
Posts: 2,662
iTrader: 0 / 0%
Connor Is Recognizable
Rep Power: 9
Where can I get HTTPWrapper? :O Or do I use GGCheck
? I don't get it ¬_¬
__________________


^Rotating Image, refresh for another sig ;)^
VLatestV
  Reply With Quote
Reply

Bookmarks



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Powered by vBadvanced CMPS v3.0 RC2

All times are GMT -7. The time now is 04:29 PM.


vBulletin skin developed by: eXtremepixels
The contents of this webpage are copyright © 2006-2008 GamingGutter.com. All Rights Reserved.

Page generated in 0.12280393 seconds (100.00% PHP - 0% MySQL) with 19 queries