Проверьте IP -формат <%
'*********************************
'Function: checkip (par_strip)
'Аргументы: строка, которая будет обнаружена STR
Автор: Аликси
Дата: 2007/7/13
'Описание: проверьте формат IP, возврат 1, в противном случае возврат 0
Пример: <%= checkip ("219,45.23.11")%>
'*********************************
FunctionCheckip (par_strip)
Checkip = 0
Dimtmploop, tmpstr
tmpstr = par_strip
Iftmpstr = "" orisnull (tmpstr) thenexitfunction
tmpstr = split (tmpstr, ".")
Ifnotisarray (tmpstr) theneexitfunction
Fortmploop = 0toubound (tmpstr)
Iftmpstr (tmploop) = "" orisnull (tmpstr (tmploop)) thenexitfunction
Ifnotisnumeric (tmpstr (tmploop)) theneexitfunction
Ifcint (tmpstr (tmploop))> 255orcint (tmpstr (tmploop)) <1thenexitfunction
Следующий
Проверка = 1
Конечная функция
%>