this is some early socket stuff i did and i just keep reusing it as it seems to work fine:
Code:
alias socket {
  if ($sock(socket)) { sockclose socket }
  sockopen socket www.url.com 80
}
on *:sockopen:socket:{
  if (!$sockerr) { 
    sockwrite -n socket GET /index.php HTTP/1.1
    sockwrite -n socket Host: url here
    sockwrite -n socket User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)
    sockwrite -n socket Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,video/x-mng,image/png,image/jpeg,image/gif;q=0.2,text/css,*/*;q=0.1..
    sockwrite -n socket Accept-Language: en-us
    sockwrite -n socket Accept-Encoding: gzip, deflate,compress;q=0.9..
    sockwrite -n socket Accept-Charset: ISO-8859-1, utf-8;q=0.66, *;q=0.66
    sockwrite -n socket Keep-Alive: 300
    sockwrite -n socket Connection: keep-alive
    sockwrite -n socket Referer: url here
    sockwrite -n socket $crlf
  }
  else { echo its gone wrong...THE END IS NEIGH, RUN FOR COVER MY CHILDREN!!!! } 
}
on *:sockread:socket:{
  var %b
  sockread %b
  echo -s %b
  }
}


That will basically output the page's html into the status window. From that you should be able to find "anchors" and add an IF statement or 2 and there ya go.