<٪
'*********************************
'الوظيفة: getUserTrueip ()
المعلمات: لا شيء
المؤلف: Alixi
"التاريخ: 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")
Endif
getUserTrueip = trim (Mid (Stripaddr ، 1،30))
الوظيفية
٪>