IP 형식 확인 <%
'*******************************
'기능 : checkip (par_strip)
'인수 : str에 의해 감지 될 문자열
'저자 : Alixi
'날짜 : 2007/7/13
'설명 : IP 형식 확인, 반환 1, 그렇지 않으면 반환 0
'예 : <%= checkip ( "219.45.23.11")%>
'*******************************
functioncheckip (par_strip)
checkip = 0
Dimtmploop, tmpstr
tmpstr = par_strip
iftmpStr = ""OrisNull (tmpstr) 및 exitfunction
tmpstr = split (tmpstr, ".")
ifnotisArray (tmpstr) exitfunction
FORTMPLOOP = 0TOUBOUND (TMPSTR)
iftmpstr (tmploop) = ""orisnull (tmpstr (tmploop)) 및 exitfunction
ifnotisnumeric (tmpstr (tmploop)) 및 exitfunction
ifcint (tmpstr (tmploop))> 255orcint (tmpstr (tmploop)) <1thenexitfunction
다음
checkip = 1
최종 기능 장애
%>