主頁:http://www.serverobjects.com/
AspPing提供命令行程式ping相同的基本功能,AspPing是免費的,沒有免費的技術支援
安裝:
將dll檔,拷貝到一個子目錄,例如NT的目錄\winnt\system32,win95/98的目錄\windows\system.
註冊dll檔,命令行將當前目錄換到該目錄,然後鍵入:
regsvr32 aspping.dll
簡單實例:
使用這個元件十分簡單
1.創建對象
2.設定一些屬性
3.調用Ping方法
<%
rem ***********************************************************
rem * 創建對象
rem ***********************************************************
Set Pinger = Server.CreateObject("AspPing.Conn")
rem ***********************************************************
rem * 設定要ping的主機
rem ***********************************************************
Pinger.RemoteHost = "www.microsoft.com"
rem ***********************************************************
rem * ping遠端主機的次數,可選
rem * 缺省值為 1
rem ***********************************************************
Pinger.PingCount = 2
rem ***********************************************************
rem * Ping 然後獲得ping的結果
rem ***********************************************************
Response.Write "<pre>" & Pinger.Ping & "</pre>"
rem ***********************************************************
rem * 釋放對象
rem ***********************************************************
Set Pinger = nothing
%>
AspPing的屬性
RemoteHost - string 字串
Blocksize - byte 位元組
TTL - byte 位元組
AspPing方法
Ping - 返回結果(字串) 來源:收集整理於互聯網
文章出處:飛諾網(www.firnow.com):http://dev.firnow.com/course/4_webprogram/asp/aso_js/20100806/527782.html