Verificar el formato IP <%
'**********************************
'Función: checkip (par_strip)
'Argumentos: cadena a detectar por STR
'Autor: Alixi
'Fecha: 2007/7/13
'Descripción: verifique el formato IP, regrese 1, de lo contrario regresa 0
'Ejemplo: <%= checkip ("219.45.23.11")%>
'**********************************
FunctionCheckip (par_strip)
Checkip = 0
Dimtmploop, tmpstr
tmpstr = par_strip
Iftmpstr = "" orisnull (tmpstr) duranexitfunction
TMPSTR = Split (TMPSTR, ".")
IfNotISArray (TMPSTR) DONMINEXITFunction
FortMPloop = 0toUbound (TMPSTR)
Iftmpstr (tmploop) = "" orisNull (tmpstr (tmploop)) thenexitfunction
IfNotisnumérico (TMPSTR (TMPLOOP)) DONEXITFunction
Ifcint (tmpstr (tmploop))> 255Ircint (tmpStr (tmploop)) <1ThenExitFunction
Próximo
Checkip = 1
Función final
%>