This snippet allows you to get the content of small websites and return them back!
$parse(URL[,argument1,argument2,...])
URL is a string where you can place %s markers which will be filled with the arguments you specify.
As a bonus theres an asynchronous version too, while the page is downloading mIRC can go on, once its downloaded it will perform the command you specifed on the recieved data!
$parseAsync (callback,URL[,argument1,argument2,...])
examples:
//echo -a $parse(http://hiscore.runescape.com/index_lite.ws?player=%s,zezima)
//echo -a $parse(http://rs.facepwn.com/Parsers/imdb.php?movie=%s,Devils+Advocate)
//echo -a $parse(http://rs.facepwn.com/Parsers/stats.php?user=%s&c1=%s&c2=%s,zezima,3,7)
//noop $parseAsync(echo -a Recieved:,http://rs.facepwn.com/Parsers/stats.php?user=%s&c1=%s&c2=%s,zezima,4,7)
alias parse {
.comopen xml msxml2.xmlhttp
var %x $com(xml,open,1,bstr,get,bstr,$+( [ $regsubex($1,/%s/g,$chr(44) $ $+ $calc(\n +1) $chr(44)) ] ),bool,-1) $&
$com(xml,send,1) $com(xml,responseText,2),%x $com(xml).result
.comclose xml
return %x
}
alias comid if ($+($1,$com(0))) return $v1
alias parseAsync {
.comopen $comid(x) msxml2.xmlhttp
noop $com($v1,open,1,bstr,get,bstr,$+( [ $regsubex($2,/%s/g,$chr(44) $ $+ $calc(\n +2) $chr(44)) ] ),bool,0)
noop $comcall($v1,noop $!com($1,responseText,2) $(|,) $1 $!com($1).result $(|,) .comclose $!1,send,1)
}