تحقق من تنسيق IP <٪
'*********************************
'الوظيفة: chvagip (par_strip)
'الحجج: سلسلة ليتم اكتشافها بواسطة str
المؤلف: Alixi
"التاريخ: 2007/7/13
الوصف: تحقق من تنسيق IP ، إرجاع 1 ، وإلا إرجاع 0
"مثال: <٪ = checkip (" 219.45.23.11 ") ٪>
'*********************************
functionCheckip (par_strip)
cadcip = 0
dimtmploop ، TMPSTR
TMPSTR = par_strip
IFTMPSTR = "" Orisnull (TMPSTR) thenexitfunction
TMPSTR = تقسيم (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
الوظيفية
٪>