Hey fellas,
i just try to give out the informations from this URL:
http://nightdev.com/hosted/uptime.php?channel=pest_xinThe scripts is "working" i have no idea how to give out the "x hours, x minutes" text from the website w.o. saveing the informations to a .ini file - the problem there, its saveing the ini like: "x=hours, x minutes" so i cant even read the ini file correct -.-!
Please - could someone help me?
My script (i know its pure noob!):on *:sockopen:uptime: {
sockwrite -n $sockname GET /hosted/uptime.php?channel=pest_xin HTTP/1.1
sockwrite -n $sockname Host: www.nightdev.com
sockwrite -n $sockname User-Agent: Mozilla/30.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)
sockwrite -n $sockname Connection: close
sockwrite -n $sockname $crlf
}
on *:sockread:uptime:{
var %uptime
sockread %uptime
/writeini uptime.ini Uptime Test %uptime
}
on *:text:!uptime:#: {
sockclose uptime
sockopen uptime nightdev.com 80
.msg # Uptime: $readini(uptime.ini,np,Uptime)
}
The ini file looks then like:[Uptime]
HTTP/1.1=200 OK
Server:=nginx
Date:=Mon, 25 Aug 2014 11:03:22 GMT
Content-Type:=text/html
Transfer-Encoding:=chunked
Connection:=close
2=hours, 27 minutes
I just need that my bot is giving out the single line that is on the url posted - not more.