function checkisurl(tmpstring)
dim c,i
checkisurl = true
tmpstring=lcase(trim(tmpstring))
if left(tmpstring,7)<>"http://" then tmpstring="http://"&tmpstring
for i = 8 to len(checkisurl)
c = lcase(mid(tmpstring, i, 1))
if instr("abcdefghijklmnopqrstuvwxyz_-./\", c) <= 0 and not isnumeric(c) then
checkisurl = false
exit function
end if
next
if left(tmpstring, 1) = "." or right(tmpstring, 1) = "." then
checkisurl = false
exit function
end if
if instr(tmpstring, ".") <= 0 then
checkisurl = false
response.write "f3"
exit function
end if
if instr(checkisurl, "..") > 0 then
checkisurl = false
end if
end function
%>
<%
if checkisurl(request("u"))=true then
%>恭喜,你的url通过!
<%
else
%>对不起,你的url不合乎规范,请重新检查!
<%end if%>
[1]
发表评论