<%
Private Function getIP()
    Dim strIPAddr
    If Request.ServerVariables("HTTP_X_FORWARDED_FOR") = "" OR InStr(Request.ServerVariables("HTTP_X_FORWARDED_FOR"), "unknown") > 0 Then
        strIPAddr = Request.ServerVariables("REMOTE_ADDR")
    ElseIf InStr(Request.ServerVariables("HTTP_X_FORWARDED_FOR"), ",") > 0 Then
        strIPAddr = Mid(Request.ServerVariables("HTTP_X_FORWARDED_FOR"), 1, InStr(Request.ServerVariables("HTTP_X_FORWARDED_FOR"), ",")-1)
    ElseIf InStr(Request.ServerVariables("HTTP_X_FORWARDED_FOR"), ";") > 0 Then
        strIPAddr = Mid(Request.ServerVariables("HTTP_X_FORWARDED_FOR"), 1, InStr(Request.ServerVariables("HTTP_X_FORWARDED_FOR"), ";")-1)
    Else
        strIPAddr = Request.ServerVariables("HTTP_X_FORWARDED_FOR")
    End If
    getIP = Trim(Mid(strIPAddr, 1, 30))
End Function

dim ip,ip1,ip2,ip3,ip4,hot
ip=split(getip(),".")
ip1=ip(0)
ip2=ip(1)
ip3=ip(2)
ip4=ip(3)
if ip1<>218 and ip1<>127 then
	hot=1
else
	if ip2<>28 and ip2<>0 then
		hot=1
	else
		if ip3<>137 and ip3<>0 then
		hot=1
		else
			if ip4<>66 and ip4<>1 then
			hot=1
			else
			hot=3
			end if
		end if	
	end if
end if
%>
