在Win2000系统中,可以通过Wscript.Shell对象的Exec方法执行命令,
简单的代码如下:
<% Response.Buffer = true % 
<% 
    url = "www.topronet.com" 
 
    Set objWShell = CreateObject("WScript.Shell") 
    Set objCmd = objWShell.Exec("ping " & url) 
    strPResult = objCmd.StdOut.Readall() 
    set objCmd = nothing: Set objWShell = nothing 
 
    strStatus = "离线" 
    if InStr(strPResult,"TTL=")0 then strStatus = "在线" 
 
    response.write url & " 状态为: " & strStatus 
    response.write ".
[ 查看全文 ]