alias getstats set %getstats $1 | sockclose stats1 | sockopen stats1 xwis.net 80
on *:sockopen:stats1:sockwrite stats1 $+(GET /xcl/?pname=,%getstats HTTP/1.1,$crlf,Host: xwis.net,$crlf,$crlf)
on *:sockread:stats1:{
var %var
sockread %var
echo -a $sockname >> %var
}
on *:sockclose:stats:echo -a CLOSED!
When I use /getstats continual, it echoes me this:
stats1 >> HTTP/1.1 200 OK
stats1 >> Date: Sat, 03 Jun 2006 17:11:07 GMT
stats1 >> Server: Apache/2.0.55 (Debian) PHP/5.1.2-1+b1 mod_ssl/2.0.55 OpenSSL/0.9.8a
stats1 >> X-Powered-By: PHP/5.1.2-1+b1
stats1 >> refresh: 300
stats1 >> Vary: Accept-Encoding
stats1 >> Content-Length: 281
stats1 >> Content-Type: text/html
stats1 >>
stats1 >> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
stats1 >> <script type="text/javascript" src="xcl.js"></script>
stats1 >> <script type="text/javascript">page_top(0);
There's a line missing now. You can see it by checking the
page source. The line would at this time be "page_search(0);t0(new Array(17,1,3519,'continual',17,0,499,499,1149306577,1,0), 1);page_bottom(1149354870);</script>".
If I quickly hit $sock(stats).rq and tab before the socket gets closed, it says "116", which is the length of the missing line. Now my guess would be that the sockread event doesn't get triggered anymore. That could be because of virus scanners blocking possible dangerous content.. but that's not it. If I run ethereal at the same time it does show up.
If I use &bvars I do get the full content, but I'd like to use regular variables for this. Anyone got any ideas? BTW: it's not in the "missing" headers, and on my mums pc it does work, and on some other guy's pc's it doesn't work either.