if {![info exists LastNews]} {
variable LastNews {}
timer 1 nerikes_connect
}
proc nerikes_connect {} {
	if {![catch { socket www.nerikes.se 80 } sock]} {
		fconfigure $sock -blocking 0 -buffering line -buffersize 10000
		fileevent $sock writable [list nerikes_write $sock]
		fileevent $sock readable [list nerikes_read $sock] 
	}
	timer 1 nerikes_connect
}

proc nerikes_write {sock} {
	fileevent $sock writable {}
	puts $sock "GET /textversion/senastenytt_idag.asp HTTP/1.0"
	puts $sock "Host: www.nerikes.se"
	puts $sock "User-Agent: Mozilla??"
	puts $sock ""
	flush $sock
}

