<%@ Language="VBScript" %>
<%
'####################################
'# #
'# 阿江ASP探針 V1.8 #
'# 040606 #
'# 阿江守候 http://www.ajiang.net #
'# 電子郵件 [email protected] #
'# #
'# 轉載本程序時請保留這些信息 #
'# #
'####################################
' 使用輸出緩衝區,避免在WIN2003顯示過慢
Response.Buffer = true
' 聲明待檢測數組
Dim ObjTotest(26,4)
ObjTotest(0,0) = "MSWC.AdRotator"
ObjTotest(1,0) = "MSWC.BrowserType"
ObjTotest(2,0) = "MSWC.NextLink"
ObjTotest(3,0) = "MSWC.Tools"
ObjTotest(4,0) = "MSWC.Status"
ObjTotest(5,0) = "MSWC.Counters"
ObjTotest(6,0) = "IISSample.ContentRotator"
ObjTotest(7,0) = "IISSample.PageCounter"
ObjTotest(8,0) = "MSWC.PermissionChecker"
ObjTotest(9,0) = "Scripting.FileSystemObject"
ObjTotest(9,1) = "(FSO 文本文件讀寫)"
ObjTotest(10,0) = "adodb.connection"
ObjTotest(10,1) = "(ADO 數據對象)"
ObjTotest(11,0) = "SoftArtisans.FileUp"
ObjTotest(11,1) = "(SA-FileUp 文件上傳)"
ObjTotest(12,0) = "SoftArtisans.FileManager"
ObjTotest(12,1) = "(SoftArtisans 文件管理)"
ObjTotest(13,0) = "LyfUpload.UploadFile"
ObjTotest(13,1) = "(劉雲峯的文件上傳組件)"
ObjTotest(14,0) = "Persits.Upload.1"
ObjTotest(14,1) = "(ASPUpload 文件上傳)"
ObjTotest(15,0) = "w3.upload"
ObjTotest(15,1) = "(Dimac 文件上傳)"
ObjTotest(16,0) = "JMail.SmtpMail"
ObjTotest(16,1) = "(Dimac JMail 郵件收發) <a href='http://www.ajiang.net'>中文手冊下載</a>"
ObjTotest(17,0) = "CDONTS.NewMail"
ObjTotest(17,1) = "(虛擬 SMTP 發信)"
ObjTotest(18,0) = "Persits.MailSender"
ObjTotest(18,1) = "(ASPemail 發信)"
ObjTotest(19,0) = "SMTPsvg.Mailer"
ObjTotest(19,1) = "(ASPmail 發信)"
ObjTotest(20,0) = "DkQmail.Qmail"
ObjTotest(20,1) = "(dkQmail 發信)"
ObjTotest(21,0) = "Geocel.Mailer"
ObjTotest(21,1) = "(Geocel 發信)"
ObjTotest(22,0) = "IISmail.Iismail.1"
ObjTotest(22,1) = "(IISmail 發信)"
ObjTotest(23,0) = "SmtpMail.SmtpMail.1"
ObjTotest(23,1) = "(SmtpMail 發信)"
ObjTotest(24,0) = "SoftArtisans.ImageGen"
ObjTotest(24,1) = "(SA 的圖像讀寫組件)"
ObjTotest(25,0) = "W3Image.Image"
ObjTotest(25,1) = "(Dimac 的圖像讀寫組件)"
public IsObj,VerObj,TestObj
public okOS,okCPUS,okCPU
'檢查預查組件支持情況及版本
dim i
for i=0 to 25
on error resume next
IsObj=false
VerObj=""
'dim TestObj
TestObj=""
set TestObj=server.CreateObject(ObjTotest(i,0))
If -2147221005 <> Err then '感謝網友iAmFisher的寶貴建議
IsObj = True
VerObj = TestObj.version
if VerObj="" or isnull(VerObj) then VerObj=TestObj.about
end if
ObjTotest(i,2)=IsObj
ObjTotest(i,3)=VerObj
next
'檢查組件是否被支持及組件版本的子程序
sub ObjTest(strObj)
on error resume next
IsObj=false
VerObj=""
TestObj=""
set TestObj=server.CreateObject (strObj)
If -2147221005 <> Err then '感謝網友iAmFisher的寶貴建議
IsObj = True
VerObj = TestObj.version
if VerObj="" or isnull(VerObj) then VerObj=TestObj.about
end if
End sub
%>
<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<TITLE>ASP探針V1.8-阿江http://www.ajiang.net</TITLE>
<style>
<!--
BODY
{
FONT-FAMILY: 宋體;
FONT-SIZE: 9pt
}
TD
{
FONT-SIZE: 9pt
}
A
{
COLOR: #000000;
TEXT-DECORATION: none
}
A:hover
{
COLOR: #3F8805;
TEXT-DECORATION: underline
}
.input
{
BORDER: #111111 1px solid;
FONT-SIZE: 9pt;
BACKGROUND-color: #F8FFF0
}
.backs
{
BACKGROUND-COLOR: #3F8805;
COLOR: #ffffff;
}
.backq
{
BACKGROUND-COLOR: #EEFEE0
}
.backc
{
BACKGROUND-COLOR: #3F8805;
BORDER: medium none;
COLOR: #ffffff;
HEIGHT: 18px;
font-size: 9pt
}
.fonts
{
COLOR: #3F8805
}
-->
</STYLE>
</HEAD>
<BODY>
<a href="mailto:[email protected]">阿江</a>改寫的ASP探針-<font class=fonts>V1.8</font><br><br>
<font class=fonts>是否支持ASP</font>
<br>出現以下情況即表示您的空間不支持ASP:
<br>1、訪問本文件時提示下載。
<br>2、訪問本文件時看到類似“<%@ Language="VBScript" %>”的文字。
<br><br>
<font class=fonts>服務器的有關參數</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> <%=Request.ServerVariables("PATH_TRANSLATED")%></td>
</tr>
<tr bgcolor="#EEFEE0" height=18>
<td align=left> 服務器解譯引擎</td><td> <%=ScriptEngine & "/"& ScriptEngineMajorVersion &"."&ScriptEngineMinorVersion&"."& ScriptEngineBuildVersion %></td>
</tr>
<%getsysinfo() '獲得服務器數據%>
<tr bgcolor="#EEFEE0" height=18>
<td align=left> 服務器CPU數量</td><td> <%=okCPUS%> 個</td>
</tr>
<tr bgcolor="#EEFEE0" height=18>
<td align=left> 服務器CPU詳情</td><td> <%=okCPU%></td>
</tr>
<tr bgcolor="#EEFEE0" height=18>
<td align=left> 服務器操作系統</td><td> <%=okOS%></td>
</tr>
</table>
</td></tr>
</table>
<br>
<font class=fonts>組件支持情況</font>
<%
Dim strClass
strClass = Trim(Request.Form("classname"))
If "" <> strClass then
Response.Write "<br>您指定的組件的檢查結果:"
Dim Verobj1
ObjTest(strClass)
If Not IsObj then
Response.Write "<br><font color=red>很遺憾,該服務器不支持 " & strclass & " 組件!</font>"
Else
if VerObj="" or isnull(VerObj) then
Verobj1="無法取得該組件版本"
Else
Verobj1="該組件版本是:" & VerObj
End If
Response.Write "<br><font class=fonts>恭喜!該服務器支持 " & strclass & " 組件。" & verobj1 & "</font>"
End If
Response.Write "<br>"
end if
%>
<br>■ IIS自帶的ASP組件
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#3F8805" width="450">
<tr height=18 class=backs align=center><td width=320>組 件 名 稱</td><td width=130>支持及版本</td></tr>
<%For i=0 to 10%>
<tr height="18" class=backq>
<td align=left> <%=ObjTotest(i,0) & "<font color=#888888> " & ObjTotest(i,1)%></font></td>
<td align=left> <%
If Not ObjTotest(i,2) Then
Response.Write "<font color=red><b>×</b></font>"
Else
Response.Write "<font class=fonts><b>√</b></font> <a title='" & ObjTotest(i,3) & "'>" & left(ObjTotest(i,3),11) & "</a>"
End If%></td>
</tr>
<%next%>
</table>
<br>■ 常見的文件上傳和管理組件
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#3F8805" width="450">
<tr height=18 class=backs align=center><td width=320>組 件 名 稱</td><td width=130>支持及版本</td></tr>
<%For i=11 to 15%>
<tr height="18" class=backq>
<td align=left> <%=ObjTotest(i,0) & "<font color=#888888> " & ObjTotest(i,1)%></font></td>
<td align=left> <%
If Not ObjTotest(i,2) Then
Response.Write "<font color=red><b>×</b></font>"
Else
Response.Write "<font class=fonts><b>√</b></font> <a title='" & ObjTotest(i,3) & "'>" & left(ObjTotest(i,3),11) & "</a>"
End If%></td>
</tr>
<%next%>
</table>
<br>■ 常見的收發郵件組件
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#3F8805" width="450">
<tr height=18 class=backs align=center><td width=320>組 件 名 稱</td><td width=130>支持及版本</td></tr>
<%For i=16 to 23%>
<tr height="18" class=backq>
<td align=left> <%=ObjTotest(i,0) & "<font color=#888888> " & ObjTotest(i,1)%></font></td>
<td align=left> <%
If Not ObjTotest(i,2) Then
Response.Write "<font color=red><b>×</b></font>"
Else
Response.Write "<font class=fonts><b>√</b></font> <a title='" & ObjTotest(i,3) & "'>" & left(ObjTotest(i,3),11) & "</a>"
End If%></td>
</tr>
<%next%>
</table>
<br>■ 圖像處理組件
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#3F8805" width="450">
<tr height=18 class=backs align=center><td width=320>組 件 名 稱</td><td width=130>支持及版本</td></tr>
<%For i=24 to 25%>
<tr height="18" class=backq>
<td align=left> <%=ObjTotest(i,0) & "<font color=#888888> " & ObjTotest(i,1)%></font></td>
<td align=left> <%
If Not ObjTotest(i,2) Then
Response.Write "<font color=red><b>×</b></font>"
Else
Response.Write "<font class=fonts><b>√</b></font> <a title='" & ObjTotest(i,3) & "'>" & left(ObjTotest(i,3),11) & "</a>"
End If%></td>
</tr>
<%next%>
</table>
<br>■ 其他組件支持情況檢測<br>
在下面的輸入框中輸入你要檢測的組件的ProgId或ClassId。
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#3F8805" width="450">
<FORM action=<%=Request.ServerVariables("SCRIPT_NAME")%> method=post id=form1 name=form1>
<tr height="18" class=backq>
<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>
<%
Response.Flush
if ObjTest("Scripting.FileSystemObject") then
set fsoobj=server.CreateObject("Scripting.FileSystemObject")
%>
<br><font class=fonts>磁盤相關測試</font>
<br>■ 服務器磁盤信息
<table class=backq border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#3F8805" width="450">
<tr height="18" align=center class="backs">
<td width="100">盤符和磁盤類型</td>
<td width="50">就緒</td>
<td width="80">卷標</td>
<td width="60">文件系統</td>
<td width="80">可用空間</td>
<td width="80">總空間</td>
</tr>
<%
' 測試磁盤信息的想法來自“COCOON ASP 探針”
set drvObj=fsoobj.Drives
for each d in drvObj
%>
<tr height="18" align=center>
<td align="right"><%=cdrivetype(d.DriveType) & " " & d.DriveLetter%>:</td>
<%
if d.DriveLetter = "A" then '爲防止影響服務器,不檢查軟驅
Response.Write "<td></td><td></td><td></td><td></td><td></td>"
else
%>
<td><%=cIsReady(d.isReady)%></td>
<td><%=d.VolumeName%></td>
<td><%=d.FileSystem%></td>
<td align="right"><%=cSize(d.FreeSpace)%></td>
<td align="right"><%=cSize(d.TotalSize)%></td>
<%
end if
%>
</tr>
<%
next
%>
</td></tr>
</table>
<br>■ 當前文件夾信息
<%
Response.Flush
dPath = server.MapPath("./")
set dDir = fsoObj.GetFolder(dPath)
set dDrive = fsoObj.GetDrive(dDir.Drive)
%>
文件夾: <%=dPath%>
<table class=backq border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#3F8805" width="450">
<tr height="18" align="center" class="backs">
<td width="75">已用空間</td>
<td width="75">可用空間</td>
<td width="75">文件夾數</td>
<td width="75">文件數</td>
<td width="150">創建時間</td>
</tr>
<tr height="18" align="center">
<td><%=cSize(dDir.Size)%></td>
<td><%=cSize(dDrive.AvailableSpace)%></td>
<td><%=dDir.SubFolders.Count%></td>
<td><%=dDir.Files.Count%></td>
<td><%=dDir.DateCreated%></td>
</tr>
</td></tr>
</table>
<br>■ 磁盤文件操作速度測試<br>
<%
Response.Flush
' 測試文件讀寫的想法來自“迷城浪子”
Response.Write "正在重複創建、寫入和刪除文本文件50次..."
dim thetime3,tempfile,iserr
iserr=false
t1=timer
tempfile=server.MapPath("./") & "/aspchecktest.txt"
for i=1 to 50
Err.Clear
set tempfileOBJ = FsoObj.CreateTextFile(tempfile,true)
if Err <> 0 then
Response.Write "創建文件錯誤!<br><br>"
iserr=true
Err.Clear
exit for
end if
tempfileOBJ.WriteLine "Only for test. Ajiang ASPcheck"
if Err <> 0 then
Response.Write "寫入文件錯誤!<br><br>"
iserr=true
Err.Clear
exit for
end if
tempfileOBJ.close
Set tempfileOBJ = FsoObj.GetFile(tempfile)
tempfileOBJ.Delete
if Err <> 0 then
Response.Write "刪除文件錯誤!<br><br>"
iserr=true
Err.Clear
exit for
end if
set tempfileOBJ=nothing
next
t2=timer
if iserr <> true then
thetime3=cstr(int(( (t2-t1)*10000 )+0.5)/10)
Response.Write "...已完成!<font color=red>" & thetime3 & "毫秒</font>。<br>"
Response.Flush
%>
<table class=backq border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#3F8805" width="450">
<tr height=18 align=center class="backs">
<td width=320>供 對 照 的 服 務 器</td>
<td width=130>完成時間(毫秒)</td>
</tr>
<tr height=18>
<td align=left> <a href="http://www.hdidc.com">華東數據hdidc.com主機<font color=#888888> 雙至強2.4,1GddrEcc,SCSI36.4G)</font></a></td><td> 32~75</td>
</tr>
<tr height=18>
<td align=left> <a href="http://www.gdxf.net/wzkj/index.htm">新豐信息港付費ASP+CGI空間</a></td><td> 46~62</td>
</tr>
<tr height=18>
<td align=left> <a href="http://www.68l.com/">68互聯</a></td><td> 78</td>
</tr>
<tr height=18>
<td align=left> <a href="http://www.diy5.com">第5空間diy5.com四至強主機<font color=#888888>(P42.4,2GddrEcc,SCSI72.8G)</font></a></td><td> 46~78</td>
</tr>
<tr height=18>
<td align=left> <a href="http://www.100u.com?come=aspcheck&keyword=虛擬主機"
>百優科技 100u 主機</a></td><td> 31~62</td>
</tr>
<tr height=18>
<td align=left> <a href="http://www.3366.com.cn"
>點擊網絡主機</a></td><td> 31~62</td>
</tr>
<tr height=18>
<td align=left> <font color=red>這臺服務器: <%=Request.ServerVariables("SERVER_NAME")%></font> </td><td> <font color=red><%=thetime3%></font></td>
</tr>
</table>
<%
end if
Response.Flush
set fsoobj=nothing
end if%>
<br>
<font class=fonts>ASP腳本解釋和運算速度測試</font><br>
<%
Response.Flush
'感謝網際同學錄 http://www.5719.net 推薦使用timer函數
'因爲只進行50萬次計算,所以去掉了是否檢測的選項而直接檢測
Response.Write "整數運算測試,正在進行50萬次加法運算..."
dim t1,t2,lsabc,thetime,thetime2
t1=timer
for i=1 to 500000
lsabc= 1 + 1
next
t2=timer
thetime=cstr(int(( (t2-t1)*10000 )+0.5)/10)
Response.Write "...已完成!<font color=red>" & thetime & "毫秒</font>。<br>"
Response.Write "浮點運算測試,正在進行20萬次開方運算..."
t1=timer
for i=1 to 200000
lsabc= 2^0.5
next
t2=timer
thetime2=cstr(int(( (t2-t1)*10000 )+0.5)/10)
Response.Write "...已完成!<font color=red>" & thetime2 & "毫秒</font>。<br>"
%>
<table class=backq border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#3F8805" width="450">
<tr height=18 align=center class="backs">
<td width=320>供對照的服務器及完成時間(毫秒)</td>
<td width=65>整數運算</td><td width=65>浮點運算</td>
</tr>
<tr height=18>
<td align=left> <a href="http://www.100u.com?come=aspcheck&keyword=虛擬主機"
>百優科技 100u 主機, <font color=#888888>2003-11-1</font></a></td><td> 181~233</td><td> 156~218</td>
</tr>
<tr height=18>
<td align=left> <a href="http://www.west263.com/index.asp?ads=ajiang"
>西部數碼 west263 主機, <font color=#888888>2003-11-1</font></a></td><td> 171~233</td><td> 156~171</td>
</tr>
<tr height=18>
<td align=left> <a href="http://www.linkwww.com "
>聯網科技 linkwww 主機, <font color=#888888>2003-11-1</font></a></td><td> 181~203</td><td> 171</td>
</tr>
<tr height=18>
<td align=left> <a href="http://www.9s5.com/"
>就是我www.9s5.com全功能(ASP+PHP+JSP)主機,<font color=#888888>2003-11-1</font></a></td><td> 171~187</td><td> 156~171</td>
</tr>
<tr height=18>
<td align=left> <a href="http://www.dnsmy.com/"
>永訊網絡 Dnsmy 主機, <font color=#888888>2003-11-1</font></a></td><td> 155~180</td><td> 122~172</td>
</tr>
<tr height=18>
<td align=left> <a href="http://www.hostidc.net"
>數據互聯 Hostidc.net 主機, <font color=#888888>2004-3-28</font></a></td><td> 156~171</td><td> 140~156</td>
</tr>
<tr height=18>
<td align=left> <font color=red>這臺服務器: <%=Request.ServerVariables("SERVER_NAME")%></font> </td><td> <font color=red><%=thetime%></font></td><td> <font color=red><%=thetime2%></font></td>
</tr>
</table>
<br>
<table border=0 width=450 cellspacing=0 cellpadding=0>
<tr><td align=center>
<b>[<a href="http://www.ajiang.net/products/aspcheck/serverlist.asp#notice">提醒·說明</a>]
[<a href="http://www.ajiang.net/products/aspcheck/serverlist.asp">更多空間商即時實測數據</a>]
[<a href="http://www.ajiang.net/products/aspcheck/">查看下載最新版</a>]</b>
</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:[email protected]?subject=阿江探針">[email protected]</a>)編寫,轉載時請保留這些信息
</td></tr>
</table>
</BODY>
</HTML>
<%
function cdrivetype(tnum)
Select Case tnum
Case 0: cdrivetype = "未知"
Case 1: cdrivetype = "可移動磁盤"
Case 2: cdrivetype = "本地硬盤"
Case 3: cdrivetype = "網絡磁盤"
Case 4: cdrivetype = "CD-ROM"
Case 5: cdrivetype = "RAM 磁盤"
End Select
end function
function cIsReady(trd)
Select Case trd
case true: cIsReady="<font class=fonts><b>√</b></font>"
case false: cIsReady="<font color='red'><b>×</b></font>"
End Select
end function
function cSize(tSize)
if tSize>=1073741824 then
cSize=int((tSize/1073741824)*1000)/1000 & " GB"
elseif tSize>=1048576 then
cSize=int((tSize/1048576)*1000)/1000 & " MB"
elseif tSize>=1024 then
cSize=int((tSize/1024)*1000)/1000 & " KB"
else
cSize=tSize & "B"
end if
end function
sub getsysinfo()
on error resume next
Set WshShell = server.CreateObject("WScript.Shell")
Set WshSysEnv = WshShell.Environment("SYSTEM")
okOS = cstr(WshSysEnv("OS"))
okCPUS = cstr(WshSysEnv("NUMBER_OF_PROCESSORS"))
okCPU = cstr(WshSysEnv("PROCESSOR_IDENTIFIER"))
if isnull(okCPUS) then
okCPUS = Request.ServerVariables("NUMBER_OF_PROCESSORS")
elseif okCPUS="" then
okCPUS = Request.ServerVariables("NUMBER_OF_PROCESSORS")
end if
if Request.ServerVariables("OS")="" then okOS=okOS & "(可能是 Windows Server 2003)"
end sub
%>