通过本文主要向大家介绍了asp获取客户端ip,asp获取客户端信息,asp一句话客户端,asp 客户端ip,asp直接读取客户端xls等相关知识,希望对您有所帮助,也希望大家支持linkedu.com www.linkedu.com
<%
'******************************
'函数:Userip()
'参数:无
'作者:阿里西西
'日期:2007/7/12
'描述:取得客户端IP地址
'示例:<%=Userip()%>
'******************************
Function Userip()
Dim GetClientIP
'如果客户端用了代理服务器,则应该用ServerVariables("HTTP_X_FORWARDED_FOR")方法
GetClientIP = Request.ServerVariables("HTTP_X_FORWARDED_FOR")
If GetClientIP = "" or isnull(GetClientIP) or isempty(GetClientIP) Then
'如果客户端没用代理,应该用Request.ServerVariables("REMOTE_ADDR")方法
GetClientIP = Request.ServerVariables("REMOTE_ADDR")
end if
Userip = GetClientIP
End function
%>
转换IP地址函数
</div> </div>
'******************************
'函数:Userip()
'参数:无
'作者:阿里西西
'日期:2007/7/12
'描述:取得客户端IP地址
'示例:<%=Userip()%>
'******************************
Function Userip()
Dim GetClientIP
'如果客户端用了代理服务器,则应该用ServerVariables("HTTP_X_FORWARDED_FOR")方法
GetClientIP = Request.ServerVariables("HTTP_X_FORWARDED_FOR")
If GetClientIP = "" or isnull(GetClientIP) or isempty(GetClientIP) Then
'如果客户端没用代理,应该用Request.ServerVariables("REMOTE_ADDR")方法
GetClientIP = Request.ServerVariables("REMOTE_ADDR")
end if
Userip = GetClientIP
End function
%>
转换IP地址函数
</div> </div>