Hi there fellas, it's been awhile for me! I have and this is actually the second time I've run into this issue, a /sockread obstacle where a script can't read the full page. So as an example I'm going to test this on drudgereport.com and we'll see what happens.
alias testgo.open {
sockopen testgo drudgereport.com 80
}
on 1:sockopen:testgo:{
var %a = .sockwrite -n testgo
%a GET / HTTP/1.0
%a Accept: */*
%a Referer: http://www.drudgereport.com/
%a Accept-Language: en-us
%a UA-CPU: x86
%a Accept-Encoding: No Compression
%a Connection: Keep-Alive
%a Host: drudgereport.com
%a $crlf
}
on 1:sockread:testgo:{
if ($sockerr > 0) return
:nextread
sockread %temp
if ($sockbr == 0) {
sockclose testgo
echo $chr(160)
return
}
if (%temp == $null) %temp = -
echo 4 %temp
goto nextread
}
You'll note that this last sockread code is pretty much straight out of the mIRC faq guide, even the goto is the same.
So we can run this with /testgo.open. We get a number of lines of html back correctly, but we don't get the whole page. It tends to stop around the first story headline. Any pointers would be greatly appreciated.