wqlQuery = "SELECT StatusCode FROM Win32_PingStatus WHERE Address" & _
" = '" & url & "'"
set PingResult = GetObject(WMI).ExecQuery(wqlQuery, "WQL", 48)
Response.write url & " 狀態 "
For Each result in PingResult
if clng(result.StatusCode)>0 then
response.write "離線"
else
response.write "線上"
end if
Next
%>
當然,我們也可以自己編寫相應的組件或者使用一些現成的組件來實現這樣的功能,
這裡就不多說了。