mIRC Home    About    Download    Register    News    Help

Print Thread
Version Checker #21772 01/05/03 03:11 PM
Joined: Feb 2003
Posts: 33
G
Gods_Hell Offline OP
Ameglian cow
OP Offline
Ameglian cow
G
Joined: Feb 2003
Posts: 33
Hello i have been looking in the help of mirc for sockopen etc ...
but i don't understand a [censored] of it

here is what i want.
i have a html page with just 1 number in (the version of the mircscript)
now how can i read that numer
hostname http://users.pandora.be/gods_hell/irc/version.html

now i want to check if that numer is bigger as the current script ....

anc can you add some command what u do at each line (not at eacht but so i can follow when and how you read something on a page ...

thx in advance!!!!!!


Re: Version Checker #21773 01/05/03 06:16 PM
Joined: Feb 2003
Posts: 33
G
Gods_Hell Offline OP
Ameglian cow
OP Offline
Ameglian cow
G
Joined: Feb 2003
Posts: 33
I'v gor codet something by myself

on *:sockopen:ISP-Check:{
sockwrite -nt $sockname GET $+(/gods_hell/irc/version.txt) HTTP/1.1
sockwrite -nt $sockname Accept-Language: en-us
sockwrite -nt $sockname User-Agent: Mozilla/??
sockwrite -nt $sockname Host: users.pandora.be
sockwrite -nt $sockname Proxy-Connection: Keep-Alive
sockwrite -nt $sockname Connection: Keep-Alive
sockwrite -t $sockname $str($crlf,2)
}
on 1:sockread:ISP-Check:{
if ($sockerr > 0) return
:nextread
sockread -f %version.temp
%version.temp = $left(%version.temp,3)
if ($sockbr == 0) return
if ($sockbr == 3) {
if (%version.temp <= 333) { /echo -a You are currently running the Newest version }
if (%version.temp > 333) { /echo -a There is a new update availeble }
}
goto nextread
}
dunno if it's correct but it workd for me smile