I am very disappointed how afew people believe I leeched a program that says I made (CBL Status Detector), this is exactly the reason I put my copyright on programs.
Ok so in this tutorial Ill show you how to detect if someone is clean or dirty. Full Source below.
[Just to let you know, I took some of these pictures when I was going to make a Clan Detector, but I decided to just show you the Clean/Dirty one]
Step 1
Open Visual Basic 2008, make a new project, make it look like this or something like this
Step 2
Once that is done, click the form itself and put
Code:
Label2.Visible = False
Inside the sub
Now go to your button, double click it and put this inside the sub
Code:
Button1.Enabled = False
Now Double click the textbox and put the code below in it
Code:
Button1.Enabled = True
So it should all look like this
Step 3
Basic coding done, lets get to the good stuff.
Add the following code in button1 click.
Code:
Dim url As String
url = "http://thecaconline.net/cbl/cbl.php?player=" + TextBox1.Text
Dim request As System.Net.HttpWebRequest = System.Net.HttpWebRequest.Create(url)
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"))
Dim Online As String
Online = sr.ReadToEnd()
Should be looking like this now.

We are almost done with this basic thing.
Step 4
Now what the above code did was read the html source of the persons page. Now we can make it so inside the text its reading it looks for a certian word or code.
People who are clean have the image "cbl/images/clean.png" and dirty people have "cbl/images/dirty.png"... And people who are banned have their names crossed out, so the code "</S></FONT></A>" is in it.
If we are wanting to detect if they are banned, we must put the banned code before everything, because if they are detected clean and banned, it will say they are clean, but not banned. So copy the below code and put it below the code we just made, in button1 click sub.
So to find out if they are clean, below the current code we just made put
Code:
If InStr(Online, "</S></FONT></A> ") Then
Label2.Text = "BANNED"
Label2.ForeColor = Color.Red
Label2.Visible = True
ElseIf InStr(Online, "cbl/images/clean.png") Then
Label2.Text = "CLEAN"
Label2.ForeColor = Color.Green
Label2.Visible = True
ElseIf InStr(Online, "cbl/images/dirty.png") Then
Label2.Text = "DIRTY"
Label2.ForeColor = Color.Red
Label2.Visible = True
End If
Should look like this
And now you are done. Add a icon, change the details of the program, and your set to release.
Ive attached my finished masterpiece.
Below is the full code.
Code:
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Label2.Visible = False
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Button1.Enabled = False
Dim url As String
url = "http://thecaconline.net/cbl/cbl.php?player=" + TextBox1.Text
Dim request As System.Net.HttpWebRequest = System.Net.HttpWebRequest.Create(url)
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"))
Dim Online As String
Online = sr.ReadToEnd()
If InStr(Online, "</S></FONT></A> ") Then
Label2.Text = "BANNED"
Label2.ForeColor = Color.Red
Label2.Visible = True
ElseIf InStr(Online, "cbl/images/clean.png") Then
Label2.Text = "CLEAN"
Label2.ForeColor = Color.Green
Label2.Visible = True
ElseIf InStr(Online, "cbl/images/dirty.png") Then
Label2.Text = "DIRTY"
Label2.ForeColor = Color.Red
Label2.Visible = True
End If
End Sub
Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
Button1.Enabled = True
End Sub