<%
'***********************************
'Fungsi: getUsertrueip ()
'Parameter: tidak ada
'Penulis: Alixi
'Tanggal: 2007/7/13
'Deskripsi: Dapatkan IP asli pengguna, dan masih berlaku untuk alamat proxy; Nilai Pengembalian: Jenis Teks Alamat IP
'Contoh: <%= getUsertrueip ()%>
'***********************************
FunctionGetUsertrueip ()
Dimstripaddr
IfRequest.serverVariable ("http_x_forwarded_for") = "" orinstr (request.serverVariables ("http_x_forwarded_for"), "tidak diketahui")> 0then
stripaddr = request.serverVariable ("remote_addr")
Elseifinstr (request.serverVariable ("http_x_forwarded_for"), ",", ")> 0then
stripaddr = mid (request.serverVariable ("http_x_forwarded_for"), 1, instr (request.serverVariables ("http_x_forwarded_for"), ",")-1)
Elseifinstr (request.serverVariable ("http_x_forwarded_for"), ";")> 0then
stripaddr = mid (request.serverVariables ("http_x_forwarded_for"), 1, instr (request.serverVariables ("http_x_forwarded_for"), ";")-1)
Kalau tidak
stripaddr = request.serverVariables ("http_x_forwarded_for")
Endif
GetUsertrueip = trim (mid (stripaddr, 1,30))
Fungsi endfungsi
%>