All pastes #169588 Raw Edit

Stuff

public text v1 · immutable
·published 2006-09-14 00:52 UTC
rendered paste body
Alias Rs { /sockopen rsfp www.runescape.com 80 | /set %item 1 | /echo 4 Opening Socket. }
} 
Alias -l htmlfree {
  var %x, %i = $regsub($1-,/(^[^<]*>|<[^>]*>|<[^>]*$)/g,$null,%x), %x = $remove(x,&nbsp;)
  return %x
}
on *:sockopen:rsfp:{
  sockwrite -n $sockname GET /lang/en/aff/runescape/title.ws HTTP/1.0
  sockwrite -n $sockname Host: runescape.com $+ $crlf $+ $crlf

}

on *:SOCKREAD:rsfp:{ 
  if ($sockerr > 0) return 
  :nextread 
  sockread %temp 
  if ($sockbr == 0) return 
  if (%temp) { /var %temp = $htmlfree( %temp ) }
  /echo 3 %item ::::: %temp
  /inc %item
  goto nextread
}
on *:sockclose:rsfp:{
  /echo 4 Socket Closed.

}