alias http.status {
var %p http://,%u $2,%w $3,%a Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1; .NET CLR 2.0.50727; .NET CLR 1.1.4322), %x
if ($prop) %p = https://
.comopen xml msxml2.xmlhttp
if ($0 < 2) echo -a $com(xml,open,1,bstr,head,bstr,%p $+ $1,bool,-1)
else noop $com(xml,open,1,bstr,head,bstr,%p $+ $1,bool,-1,bstr,%u,bstr,%w)
noop $com(xml,setRequestHeader,3,bstr,User-Agent,bstr,%a) $com(xml,send,1) $com(xml,status,2)
%x = $com(xml).result
.comclose xml
return %x
:error
echo -geca info * $!http.status : $error $com(xml).errorText
if ($com(xml)) .comclose xml
reseterror
return s
}