Verify Ip format <%
'*********************************
'Function: CheckIp(paR_strIp)
'Arguments: string to be detected by str
'Author: Alixi
'Date: 2007/7/13
'Description: Verify the Ip format, return 1, otherwise return 0
'Example: <%=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
Next
CheckIp=1
EndFunction
%>