?? asp.asp
字號:
<%@ Language="VBScript" %>
</center><%
Rem 判斷用戶系統信息
function usersysinfo(info,getinfo)
if instr(info,";")>0 then
dim usersys
usersys=split(info,";")
if ubound(usersys)>=2 then
usersys(1)=replace(usersys(1),"MSIE","Internet Explorer")
usersys(2)=replace(usersys(2),")","")
usersys(2)=replace(usersys(2),"NT 5.1","XP")
usersys(2)=replace(usersys(2),"NT 5.0","2000")
usersys(2)=replace(usersys(2),"9x","Me")
usersys(1)="瀏 覽 器:" & Trim(usersys(1))
usersys(2)="操作系統:" & Trim(usersys(2))
if getinfo=1 then
usersysinfo=usersys(1)
else
usersysinfo=usersys(2)
end if
else
if getinfo=1 then
usersysinfo="瀏 覽 器:未知"
else
usersysinfo="操作系統:未知"
end if
end if
else
if getinfo=1 then
usersysinfo="未知"
else
usersysinfo="未知"
end if
end if
end function
Dim userip,userip2
userip = Request.ServerVariables("HTTP_X_FORWARDED_FOR")
userip2 = Request.ServerVariables("REMOTE_ADDR")
if userip = "" then
response.write "您的 IP 是:"&userip2&" "
else
response.write "您的真實 IP 是:"&userip&" "
end if
response.write usersysinfo(Request.ServerVariables("HTTP_USER_AGENT"),2)&" "&usersysinfo(Request.ServerVariables("HTTP_USER_AGENT"),1)
%><br><br><br></center>
<%
'####################################
'# #
'# 阿江ASP探針 V1.3 #
'# #
'# 阿江守候 http://www.ajiang.net #
'# 電子郵件 zjyfc@263.net #
'# #
'# 轉載本程序時請保留這些信息 #
'# #
'####################################
Dim theInstalledObjects(17)
theInstalledObjects(0) = "MSWC.AdRotator"
theInstalledObjects(1) = "MSWC.BrowserType"
theInstalledObjects(2) = "MSWC.NextLink"
theInstalledObjects(3) = "MSWC.Tools"
theInstalledObjects(4) = "MSWC.Status"
theInstalledObjects(5) = "MSWC.Counters"
theInstalledObjects(6) = "IISSample.ContentRotator"
theInstalledObjects(7) = "IISSample.PageCounter"
theInstalledObjects(8) = "MSWC.PermissionChecker"
theInstalledObjects(9) = "Scripting.FileSystemObject"
theInstalledObjects(10) = "adodb.connection"
theInstalledObjects(11) = "SoftArtisans.FileUp"
theInstalledObjects(12) = "SoftArtisans.FileManager"
theInstalledObjects(13) = "JMail.SMTPMail"
theInstalledObjects(14) = "CDONTS.NewMail"
theInstalledObjects(15) = "Persits.MailSender"
theInstalledObjects(16) = "LyfUpload.UploadFile"
theInstalledObjects(17) = "Persits.Upload"
'檢查組件是否被支持
Function IsObjInstalled(strClassString)
On Error Resume Next
IsObjInstalled = False
Err = 0
Dim xTestObj
Set xTestObj = Server.CreateObject(strClassString)
If 0 = Err Then IsObjInstalled = True
Set xTestObj = Nothing
Err = 0
End Function
'檢查組件版本
Function getver(Classstr)
On Error Resume Next
getver=""
Err = 0
Dim xTestObj
Set xTestObj = Server.CreateObject(Classstr)
If 0 = Err Then getver=xtestobj.version
Set xTestObj = Nothing
Err = 0
End Function
%>
<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<TITLE>ASP探針V1.3-阿江http://www.ajiang.net</TITLE>
<style>
<!--
A { COLOR: #000000; FONT-FAMILY: 宋體; TEXT-DECORATION: none}
A:hover { COLOR: green; FONT-FAMILY: 宋體; TEXT-DECORATION: underline}
.A2 { COLOR: green; FONT-FAMILY: 宋體; TEXT-DECORATION: none}
.A2:hover { COLOR: #000000; FONT-FAMILY: 宋體; TEXT-DECORATION: underline}
body { font-family: 宋體; font-size: 9pt}
td { font-family: 宋體; font-size: 9pt}
.input { BACKGROUND-COLOR: #ffffff;BORDER:#3F8805 1px solid;FONT-SIZE: 9pt}
.backc { BACKGROUND-COLOR: #3F8805;BORDER:#3F8805 1px solid;FONT-SIZE: 9pt;color:white}
-->
</STYLE>
</HEAD>
<BODY>
<a href="mailto:zjyfc@263.net">阿江</a>改寫的ASP探針-<font color=green>V1.3</font><br><br>
<font color=green>是否支持ASP</font>
<br>出現以下情況即表示您的空間不支持ASP:
<br>1、訪問本文件時提示下載。
<br>2、訪問本文件時看到類似“<%@ Language="VBScript" %>”的文字。
<br><br>
<font color=green>服務器的有關參數</font>
<table border=0 width=450 cellspacing=0 cellpadding=0 bgcolor="#3F8805">
<tr><td>
<table border=0 width=450 cellspacing=1 cellpadding=0>
<tr bgcolor="#EEFEE0" height=18>
<td align=left> 服務器名</td><td> <%=Request.ServerVariables("SERVER_NAME")%></td>
</tr>
<tr bgcolor="#EEFEE0" height=18>
<td align=left> 服務器IP</td><td> <%=Request.ServerVariables("LOCAL_ADDR")%></td>
</tr>
<tr bgcolor="#EEFEE0" height=18>
<td align=left> 服務器端口</td><td> <%=Request.ServerVariables("SERVER_PORT")%></td>
</tr>
<tr bgcolor="#EEFEE0" height=18>
<td align=left> 服務器時間</td><td> <%=now%></td>
</tr>
<tr bgcolor="#EEFEE0" height=18>
<td align=left> IIS版本</td><td> <%=Request.ServerVariables("SERVER_SOFTWARE")%></td>
</tr>
<tr bgcolor="#EEFEE0" height=18>
<td align=left> 腳本超時時間</td><td> <%=Server.ScriptTimeout%> 秒</td>
</tr>
<tr bgcolor="#EEFEE0" height=18>
<td align=left> 本文件路徑</td><td> <%=server.mappath(Request.ServerVariables("SCRIPT_NAME"))%></td>
</tr>
<tr bgcolor="#EEFEE0" height=18>
<td align=left> 服務器CPU數量</td><td> <%=Request.ServerVariables("NUMBER_OF_PROCESSORS")%> 個</td>
</tr>
<tr bgcolor="#EEFEE0" height=18>
<td align=left> 服務器解譯引擎</td><td> <%=ScriptEngine & "/"& ScriptEngineMajorVersion &"."&ScriptEngineMinorVersion&"."& ScriptEngineBuildVersion %></td>
</tr>
<tr bgcolor="#EEFEE0" height=18>
<td align=left> 服務器操作系統</td><td> <%=Request.ServerVariables("OS")%></td>
</tr>
</table>
</td></tr>
</table>
<br>
<font color=green>組件支持情況</font>
<%
Dim strClass
strClass = Trim(Request.Form("classname"))
If "" <> strClass then
Response.Write "<br>您指定的組件的檢查結果:"
If Not IsObjInstalled(strClass) then
Response.Write "<br><font color=red>很遺憾,該服務器不支持" & strclass & "組件!</font>"
Else
Response.Write "<br><font color=green>恭喜!該服務器支持" & strclass & "組件。該組件版本是:" & getver(strclass) & "</font>"
End If
Response.Write "<br>"
end if
%>
<br>■ IIS自帶的ASP組件
<table border=0 width=450 cellspacing=0 cellpadding=0 bgcolor="#3F8805">
<tr><td>
<table border=0 width=450 cellspacing=1 cellpadding=0>
<tr height=18 style="color:#ffffff" align=center>
<td width=350>組 件 名 稱</td><td width=100>支持及版本</td>
</tr>
<%
dim i
For i=0 to 10
Response.Write "<TR bgcolor=#EEFEE0 align=center height=18><TD align=left> " & theInstalledObjects(i) & "<font color=#888888> "
select case i
case 9
Response.Write "(FSO 文本文件讀寫)"
case 10
Response.Write "(ACCESS 數據庫)"
end select
Response.Write "</font></td>"
If Not IsObjInstalled(theInstalledObjects(i)) Then
Response.Write "<td align=left> <font color=red><b>×</b></font></td>"
Else
Response.Write "<td align=left> <font color=green><b>√</b></font> " & getver(theInstalledObjects(i)) & "</td>"
End If
Response.Write "</TR>" & vbCrLf
Next
%>
</table>
</td></tr>
</table>
<br>■ 常見的其他組件
<table border=0 width=450 cellspacing=0 cellpadding=0 bgcolor="#3F8805">
<tr><td>
<table border=0 width=450 cellspacing=1 cellpadding=0>
<tr height=18 style="color:#ffffff" align=center>
<td width=350>組 件 名 稱</td><td width=100>支持及版本</td>
</tr>
<%
For i=11 to UBound(theInstalledObjects)
Response.Write "<TR bgcolor=#EEFEE0 align=center height=18><TD align=left> " & theInstalledObjects(i) & "<font color=#888888> "
select case i
case 11
Response.Write "(SA-FileUp 文件上傳)"
case 12
Response.Write "(SA-FM 文件管理)"
case 13
Response.Write "(JMail 郵件發送)"
case 14
Response.Write "(CDONTS 郵件發送 SMTP Service)"
case 15
Response.Write "(ASPEmail 郵件發送)"
case 16
Response.Write "(LyfUpload 文件上傳)"
case 17
Response.Write "(ASPUpload 文件上傳)"
end select
Response.Write "</font></td>"
If Not IsObjInstalled(theInstalledObjects(i)) Then
Response.Write "<td align=left> <font color=red><b>×</b></font></td>"
Else
Response.Write "<td align=left> <font color=green><b>√</b></font> " & getver(theInstalledObjects(i)) & "</td>"
End If
' if i = 13 and IsObjInstalled(theInstalledObjects(13)) then
' dim jmail
' Set JMail = Server.CreateObject("JMail.smtpmail")
' Response.Write "</tr><tr bgcolor=#EEFEE0 ><td colspan=3><font color=#888888> w3 JMail 是 Dimac 公司(www.dimac.net)推出的ASP發信組件,可以在ASP、VC、VB、Delphi等開發工具中調用。和其他發信組件相比,它具有支持HTML、多收件人、抄送、暗送等特點,4.0以上版本還支持SMTP發信認證、群發、POP3收信等。<br> 目前安裝的JMail組件版本是:</font>" & jmail.Version & "</td>"
' end if
Response.Write "</TR>" & vbCrLf
Next
%>
</table>
</td></tr>
</table>
<br>
<font color=green>其他組件支持情況檢測</font><br>
在下面的輸入框中輸入你要檢測的組件的ProgId或ClassId。
<table border=0 width=450 cellspacing=0 cellpadding=0 bgcolor="#3F8805">
<tr><td>
<table border=0 width=450 cellspacing=1 cellpadding=0>
<FORM action=<%=Request.ServerVariables("SCRIPT_NAME")%> method=post id=form1 name=form1>
<tr bgcolor="#EEFEE0" height=18>
<td align=center height=30><input class=input type=text value="" name="classname" size=40>
<INPUT type=submit value="確定" class=backc id=submit1 name=submit1>
<INPUT type=reset value="重填" class=backc id=reset1 name=reset1>
</td>
</tr>
</FORM>
</table>
</td></tr>
</table>
<br>
<font color=green>ASP腳本解釋和運算速度測試</font><br>
我們讓服務器執行500萬次“1+1”的計算,記錄其所使用的時間。
<table border=0 width=450 cellspacing=0 cellpadding=0 bgcolor="#3F8805">
<tr><td>
<table border=0 width=450 cellspacing=1 cellpadding=0>
<tr style="color:#ffffff" height=18>
<td align=center>服 務 器</td><td align=center>完成時間</td>
</tr>
<tr bgcolor="#EEFEE0" height=18>
<td align=left> 阿江的電腦(256M雷鳥900)</td><td> 3 秒</td>
</tr>
<tr bgcolor="#EEFEE0" height=18>
<td align=left> 中國頻道虛擬主機www82(10月20日15:10)</td><td> 6 秒</td>
</tr>
<tr bgcolor="#EEFEE0" height=18>
<td align=left> 我看看中文網主機(10月20日15:14)</td><td> 4 秒</td>
</tr>
<tr bgcolor="#EEFEE0" height=18>
<td align=left> westwebmaster.com免費空間(12月11日16:38)</td><td> 4 秒</td>
</tr>
<form action="<%=Request.ServerVariables("SCRIPT_NAME")%>" method=post>
<%
if Request.Form("test") <> "" then
dim t1,t2,lsabc,thetime
t1=now
for i=1 to 5000000
lsabc= 1 + 1
next
t2=now
thetime=cstr(int(cdbl((t2-t1)*24*60*60)+0.5))
%>
<tr bgcolor="#EEFEE0" height=25>
<td align=left> <font color=red>您正在使用的這臺服務器</font> <INPUT type="submit" value="重新測試" class=backc id=submit2 name=test></td><td> <font color=red><%=thetime%> 秒</font></td>
</tr>
<%else%>
<tr bgcolor="#EEFEE0" height=25>
<td align=left> <font color=red>您正在使用的這臺服務器</font></td><td> <INPUT type="submit" value="測 試" class=backc id=submit2 name=test></td>
</tr>
<%end if%>
</form>
</table>
</td></tr>
</table>
<br>
<table border=0 width=450 cellspacing=0 cellpadding=0>
<tr><td align=center>
歡迎訪問 【阿江守候】 <a href="http://www.ajiang.net">http://www.ajiang.net</a>
<br>本程序由阿江(<a href="mailto:zjyfc@263.net">zjyfc@263.net</a>)編寫,轉載時請保留這些信息
</td></tr>
</table>
</BODY>
</HTML>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -