IP形式を確認<%
'*******************************
'機能:CheckIp(Par_strip)
'引数:strによって検出される文字列
著者:アリクシ
'日付:2007/7/13
'説明:IP形式を確認し、1を返し、それ以外の場合は0を返します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)thenexitfunction
fortmploop = 0toubound(tmpstr)
iftmpstr(tmploop)= "" orisnull(tmpstr(tmploop))thenexitfunction
ifnotisnumeric(tmpstr(tmploop))thenexitfunction
ifcint(tmpstr(tmploop))> 255orcint(tmpstr(tmploop))<1thenexitfunction
次
CheckIp = 1
エンド機能
%>