IRCForumları - IRC ve mIRC Kullanıcılarının Buluşma Noktası
  sohbet

 Kayıt ol  Topluluk
Yeni Konu aç Cevapla
 
LinkBack Seçenekler Stil
Alt 21 Temmuz 2008, 18:39   #1
Çevrimdışı
Yardımcı Admin
Kullanıcıların profil bilgileri misafirlere kapatılmıştır.
IF Ticaret Sayısı: (0)
IF Ticaret Yüzdesi:(%)
IP Doğrulama




PHP Kod:   Kodu kopyalamak için üzerine çift tıklayın!
'Projenize 1 adet metin kutusu ve bir adet buton ekleyin

Public Function Valid_IP(IP As String) As Boolean
    Dim i As Integer
    Dim dot_count As Integer
    Dim test_octet As String
    Dim byte_check
     IP = Trim$(IP)

     ' 
make sure the IP long enough before
     
' continuing
     If Len(IP) < 8 Then
        Valid_IP = False
        '
Show Message
        MsgBox IP 
" is Invalid", , "IP Validator"
        
Exit Function
    
End If

    
1
    dot_count 
0
    
For 1 To Len(IP)
        If 
Mid$(IPi1) = "." Then
            
' increment the dot count and
            ' 
clear the test octet variable
            dot_count 
dot_count 1
            test_octet 
""
            
If Len(IPThen
                
' we've ended with a dot
                
' this is not good
                Valid_IP = False
                '
Show Message
                MsgBox IP 
" is Invalid", , "IP Validator"
                
Exit Function
            
End If
        Else
            
test_octet test_octet Mid$(IPi1)
            
On Error Resume Next
            byte_check 
CByte(test_octet)
            If (
ErrThen
                
' either the value is not numeric
                ' 
or exceeds the range of the byte
                
' data type.
                Valid_IP = False
                Exit Function
            End If
        End If
    Next i
     ' 
so farso good
      
' did we get the correct number of dots?
    If dot_count <> 3 Then
        Valid_IP = False
        Exit Function
    End If
     ' 
we have a valid IP format!
    
Valid_IP True
        
'Show Message
        MsgBox IP & " is Valid", , "IP Validator"
    
End Function

Private Sub Command1_Click()
    If Len(Text1) = 0 Then
        MsgBox "Please type an IP Address in the textbox.", , "IP Validator"
    Else
        '
Call the Function
        
Valid_IP Text1
    End 
If
End Sub 

Alıntıdır

__________________
[Üye Olmadan Linkleri Göremezsiniz. Üye Olmak için TIKLAYIN...]

[Üye Olmadan Linkleri Göremezsiniz. Üye Olmak için TIKLAYIN...]
 
Alıntı ile Cevapla

IRCForumlari.NET Reklamlar
sohbet odaları reklam ver Benimmekan Mobil Sohbet
Cevapla

Etiketler
doğrulama


Konuyu Toplam 1 Üye okuyor. (0 Kayıtlı üye ve 1 Misafir)
 

Yetkileriniz
Konu Acma Yetkiniz Yok
Cevap Yazma Yetkiniz Yok
Eklenti Yükleme Yetkiniz Yok
Mesajınızı Değiştirme Yetkiniz Yok

BB code is Açık
Smileler Açık
[IMG] Kodları Açık
HTML-Kodu Kapalı
Trackbacks are Kapalı
Pingbacks are Açık
Refbacks are Açık


Benzer Konular
Konu Konuyu Başlatan Forum Cevaplar Son Mesaj
Tarih validation doğrulama işlemi hAte HTML/CSS/JavaScript 0 16 Ekim 2014 15:20
Tarih validation doğrulama işlemi hAte HTML/CSS/JavaScript 0 10 Ekim 2014 03:51
PHP’de Resim Doğrulama - Güvenlik Kodu MorfiN PHP 0 27 Nisan 2012 20:29
Tc Kimlik No Doğrulama Addonu XxxxX mIRC Scripting Sorunları 4 21 Şubat 2006 22:32