on 1:sockopen:qrz: {
set %url /detail/ $+ $read("C:\Documents and Settings\Owner\Desktop\hams.txt",%ln)
sockwrite -n $sockname GET %url HTTP/1.1
sockwrite -n $sockname Host: www.qrz.com $+ $crlf $+ $crlf
}
on 1:sockread:qrz:{
if ($sockerr) {
echo -a Error.
halt
}
else {
sockread %temptext
if (Country isin %temptext) {
write "C:\Documents and Settings\Owner\Desktop\hams2.txt" $html(%temptext)
%ln = %ln + 1
if (%ln <= $lines("C:\Documents and Settings\Owner\Desktop\hams.txt"){
set %url $read("C:\Documents and Settings\Owner\Desktop\hams.txt",%ln)
qrz
}
}
}
}
alias qrz {
if (!%ln) set %ln 1
sockclose qrz
sockopen qrz www.qrz.com 80
}
alias -l html {
var %x, %i = $regsub($1-,/(^[^<]*>|<[^>]*>|<[^>]*$)/g,$null,%x), %x = $remove(%x, )
return %x
}