Sockets again... - 16/04/07 12:17 AM
I don't get. Trying to connect to
http://www.capitalfm.lv/inc/radio.php
page...
It just returns:
I don't get, why it doen't, that, what I want
http://www.capitalfm.lv/inc/radio.php
page...
Code:
alias capitalfm { if (%capitalfm.delay == 1) { .notice $2 Wait a moment... return } set -u5 %capitalfm.delay 1 sockopen capitalfmsock www.capitalfm.lv 80 } on *:sockopen:capitalfmsock: { sockwrite -n $sockname GET /inc/radio.php HTTP/1.0 sockwrite -n $sockname User-Agent: Mozilla/4.0 (compatible; MSIE 4.01; Windows NT) sockwrite -n $sockname Host: www.capitalfm.lv sockwrite -n $sockname Accept-Language: en-us sockwrite -n $sockname Accept-Encoding: gzip, deflate sockwrite -n $sockname Accept: */* $+ $crlf $+ $crlf } on *:sockread:capitalfmsock: { if ($sockerr) { echo -a Error. halt } else { var %temptext sockread %temptext if (ON isin %temptext) { capitalfm-result %temptext } } } alias capitalfm-result { echo -a $1 unset %capitalfm.* sockclose capitalfmsock }
It just returns:
Quote:
HTTP/1.0 200 OK
Date: Mon, 16 Apr 2007 00:12:28 GMT
Server: Apache
Set-Cookie: SESSID=74026a413bebfa41be1d18d2ec8c5e31; path=/
Content-Type: text/html
X-Cache: MISS from 172.16.0.1
Via: 1.0 172.16.0.1:80 (squid/2.6.STABLE9)
Connection: close
Date: Mon, 16 Apr 2007 00:12:28 GMT
Server: Apache
Set-Cookie: SESSID=74026a413bebfa41be1d18d2ec8c5e31; path=/
Content-Type: text/html
X-Cache: MISS from 172.16.0.1
Via: 1.0 172.16.0.1:80 (squid/2.6.STABLE9)
Connection: close
I don't get, why it doen't, that, what I want