<%
'*********************************
'Function: getUserTrueip ()
'Параметры: нет
Автор: Аликси
Дата: 2007/7/13
'Описание: Получите настоящий IP -адрес пользователя, и он все еще действителен для прокси -адреса; Возвращение значения: тип текста IP -адрес
Пример: <%= getUserTrueip ()%>
'*********************************
FunctiongetUserTrueip ()
Dimstripaddr
Ifrequest.servervariables ("http_x_forwarded_for") = "" orinstr (request.servervariables ("http_x_forwarded_for"), "неизвестно")> 0then
stripaddr = request.servervariables ("remote_addr")
Elseifinstr (request.servervariables ("http_x_forwarded_for"), ",", ")> 0then
stripaddr = mid (request.servervariables ("http_x_forwarded_for"), 1, instr (request.servervariables ("http_x_forwarded_for"), ",")-1)
Elseifinstr (request.servervariables ("http_x_forwarded_for"), ";")> 0then
stripaddr = mid (request.servervariables ("http_x_forwarded_for"), 1, instr (request.servervariables ("http_x_forwarded_for"), ";")-1)
Еще
stripaddr = request.servervariables ("http_x_forwarded_for")
Эндиф
GetUserTrueip = trim (mid (stripaddr, 1,30))
Конечная функция
%>