alias home {
echo -s *** Trying to connect to home.moptop.info
sockopen home home.moptop.info 80
}
on *:sockopen:home:{
echo Trying to communicate...
sockwrite -n home GET / HTTP/1.1
sockwrite -n home Host: home.moptop.info
sockwrite -n home $crlf
}
on 1:sockread:home:{
if ($sockerr > 0) return
var %x | sockread -fn %x
if ($right($gettok(%x,1,32),1) == :) || (http/1.1 == $gettok(%x,1,32)) { return }
elseif ($nhtml(%x) == $null) { return }
else {
echo -a $nhtml(%x)
}
}
alias -l nhtml { return $remove($regsubex($1-,/( |^[^<]*>|<[^>]*>|<[^>]*$)/g,),$chr(9)) }