Please Note : This is not
Code:
Textbox1.Text = "MYAWESOMEPASS" : THEN : Msgbox("Password Accepted")
..This is a System used where you can register members..
Tutorial Length : 2 Minutes (All you have to do is copy and paste lol xD)
Tutorial Goal : To Create a login system
Tutorial Difficulty : .1/10
1. > Add 2 Textboxes one for the username one for the password...Label them however you want..
2. > Add 1 Button (This one is to click when you want to Login)
3. > Copy and Paste this code to your form assuming its named Form1
Code:
Public Class Form1
Dim Accepted = 2
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
On Error GoTo ERRORCODE1
Dim WebCache As String
Dim Usernameconfig
Dim Result
Usernameconfig = TextBox1.Text.Replace(" ", "%20")
WebCache = "https://example.com/users/" + Usernameconfig + ".txt"
Dim request As System.Net.HttpWebRequest = System.Net.HttpWebRequest.Create(WebCache)
Dim response As System.Net.HttpWebResponse = request.GetResponse()
Dim sr As System.IO.StreamReader = New System.IO.StreamReader(response.GetResponseStream(), System.Text.Encoding.GetEncoding("windows-1252"))
Result = sr.ReadToEnd()
If TextBox2.Text = Result Then
Call AcceptedSub()
Accepted = 1
End If
ERRORCODE1: If Accepted = 1 Then : Else : MsgBox("Invalid Username or Password") : End If
Accepted = 2
End Sub
Private Sub AcceptedSub()
'MsgBox("Accepted")
' Place the code here what ever you want it to do when it Accepts you.
End Sub
End Class
4. > Replace
Code:
https://example.com/users/
with your website directory and make sure you have a special directory for the users
5. > Add what ever you want it to do when it accepts a user in
Code:
Private Sub AcceptedSub()
6. > Your done!
How to make a User!
1. > Go to your web Directory and then your user's folder
2. > Make a .txt file named what ever you want the user's name to be
3. > Inside the text file enter there desired password.
Note : I realize this might not be the best way...but it is the easiest that I know of, and If I have time Ill update the Tut with a basic encrypter to
improve security
Note : The Username and Password is CASE sensitive