I need to collect information on some hosts. I have seen many of my friends write similar code before. Unfortunately, I can't find it and I can't write it on my own. It's mainly about collecting target systems and browsers, the Code is as follows:
<%
Testfile = Server. MapPath ("createfile. dat ")
Ip = request. ServerVariables ("REMOTE_ADDR ")
Httpheader = Request. ServerVariables ("Http_User_Agent ")
Mytime = now ()
Set fs = server. CreateObject ("scripting. filesystemobject ")
Set thisfile = fs. OpenTextFile (testfile, 8, True, 0)
Thisfile. WriteLine ("ip:" & ip)
Thisfile. WriteLine ("time:" & mytime)
Thisfile. WriteLine ("header:" & httpheader)
Thisfile. WriteLine ("---------------------------------------")
Thisfile. close
Set fs =
Nothing
%>
Why not use javascript? In fact, it is very simple, mainly considering that IE8 has other partial browser to intercept these requests and prompts the user to execute these scripts. Isn't that a dead end? Use asp to replace it.