If you had said you wanted it in separate variables to begin with rather than all in one, it would have been faster to get you want you wanted.

Code:
alias FCKnudde {
  sockclose FCKnudde
  unset %fcknudde.*
  sockopen FCKnudde www.nusport.nl 80 
} 
on *:SOCKOPEN:FCKnudde: {
  sockwrite -nt $sockname GET /fc-knudde/ HTTP/2.0
  sockwrite -nt $sockname Host: www.nusport.nl
  sockwrite -nt $sockname Connection: close
  sockwrite -nt $sockname
}
on *:SOCKREAD:FCKnudde: {
  if ($sockerr) { echo -a SOCKERR: $sockerr | halt }
  else {
    sockread -fn &sockreader
    if ($regex($bvar(&sockreader,1-).text,/<span class="title">(.+?)<\/span>/i)) {
      inc %fcknudde.cnt
      set %fcknudde. $+ %fcknudde.cnt $regml(1)
    }
  }
}



** Not really sure why we're using HTTP 2.0 here. Typically, it's 1.0 or sometimes 1.1. But as long as it's working, it should be fine.

Last edited by Riamus2; 28/04/11 07:11 PM.

Invision Support
#Invision on irc.irchighway.net