I'm wondering how to read (every 15 minutes) the random message from http://www.randommessages.com/ using sockets.

This is what I got so far:

alias ver {
  timer 1 1 sockclose random 
  timer 1 1 sockopen random randommessages.com 80
  inc %socket 1
  msg #dj-serv socket read %socket

on *:sockopen:random:{ 
  sockwrite -n $sockname GET / HTTP/1.1 
  sockwrite -n $sockname Host: randommessages.com $+ $str($crlf ,2)
on *:sockread:random:{ 
  sockread %temp 
  if <h1> isin %temp { timer 1 1 msg #dj-serv found <h1> ! | timer 1 1 msg #dj-serv I want that h1 line here :( something with $matchtok ?  } 

I've made this using a tutorial xD, just now have to get the rest of it, the random message between <h1> and </h1>

Last edited by DuXxXieJ; 21/07/11 07:42 PM.

Squee whenever a squee squee's. Squee whenever a squee does not squee.