批处理测试网站连通性
 
@echo off
set url=%1
set action=%2
if not defined url (set url=www.mxcz.net)
if not defined action (set action=GET)

copy nul sendhttptest.vbs
echo set sh=WScript.CreateObject("WScript.Shell")>>sendhttptest.vbs
echo WScript.Sleep 500>>sendhttptest.vbs
echo sh.SendKeys "Open %url% 80">>sendhttptest.vbs
echo WScript.Sleep 500>>sendhttptest.vbs
echo sh.SendKeys "{ENTER}">>sendhttptest.vbs
echo WScript.Sleep 1000>>sendhttptest.vbs
echo sh.SendKeys "%action% / HTTP/1.0">>sendhttptest.vbs
echo sh.SendKeys "{ENTER}">>sendhttptest.vbs
echo sh.SendKeys "{ENTER}">>sendhttptest.vbs
@echo on
start telnet

cscript //nologo sendhttptest.vbs

if exist sendhttptest.vbs (del sendhttptest.vbs)