Verifique o formato IP <%
'***********************************
'Função: checkip (par_strip)
'Argumentos: String a ser detectada por STR
'Autor: Alixi
Data: 2007/7/13
'Descrição: Verifique o formato IP, retorne 1, caso contrário, retorne 0
'Exemplo: <%= checkip ("219.45.23.11")%>
'***********************************
FunctionCheckip (par_strip)
Verifique = 0
DIMTMPLOOP, TMPSTR
tmpstr = par_strip
Iftmpstr = "" orisnull (tmpstr) thenExitfunção
tmpstr = split (tmpstr, ".")
IFNOTISARRAY (TMPSTR) ThenExitFunction
Fortmplop = 0TOUBOUND (TMPSTR)
Iftmpstr (tmplop) = "" orisnull (tmpstr (tmplop)) thenExitfunção
Ifnotisnumeric (TMPSTR (tmplop)) ThenExitfunção
IFCINT (TMPSTR (TMPLOOP))> 255Orcint (TMPSTR (TMPLOOP)) <1ThenexitFunction
Próximo
Verificação = 1
Função final
%>