IP Banner

Heres your chance to share your own tutorials with the community. Just post them on here. If your lucky they may even be posted on the main site.
13 posts Page 2 of 2
Contributors
User avatar
astheyfall
VIP - Donator
VIP - Donator
Posts: 160
Joined: Sun Sep 19, 2010 6:13 am

Re: IP Banner
astheyfall
So, We put the persons IP in the coding first? Then, when we want them banned we type in there IP?

Example:
Code: Select all
If TextBox1.Text = "127.0.0.1" Then
            MsgBox("Your ip address is banned!", MsgBoxStyle.Critical, "Banned")
            End


Textbox1: 127.0.0.1

Am I wrong?
User avatar
M1z23R
VIP - Donator
VIP - Donator
Posts: 622
Joined: Tue Sep 28, 2010 4:55 pm

Re: IP Banner
M1z23R
Little correction - simple one
Code: Select all
Dim IP as String = textbox1.text
Dim IPs() as String 'banned IPs
For Each IP in IPs
    ' If IP = Textbox1.Text Then 'not needed
          MsgBox("You are Banned!")
    ' End If 'not needed
Next
User avatar
astheyfall
VIP - Donator
VIP - Donator
Posts: 160
Joined: Sun Sep 19, 2010 6:13 am

Re: IP Banner
astheyfall
M1z23R wrote:
Little correction - simple one
Code: Select all
Dim IP as String = textbox1.text
Dim IPs() as String 'banned IPs
For Each IP in IPs
    ' If IP = Textbox1.Text Then 'not needed
          MsgBox("You are Banned!")
    ' End If 'not needed
Next
So, I would I still need to add the IPs manually?
13 posts Page 2 of 2
Return to “Tutorials”