alias radio {
sockclose radyo*S
sockclose radyo*J
if (: !isin $1) && (!$2) { echo -a Port Yazın (Örn : radyo.blah.com:2525) | return }
if ($1 == $null) { echo -a Radyo Adı Yazın (Örn : radyo.blah.com:2525) | return }
if (: isin $1) {
echo -a Lütfen Bekleyin..
tokenize 58 $remove($1,http://,/)
sockopen $+(radyo,$r(1,9999),S) $1 $2
set %site $1 $2
}
else { sockopen $+(radyo,$r(1,999),!) $remove($1-,http://,/) | set %site $remove($1-,http://,/) | echo -a Lütfen Bekleyin.. }
}
on *:SockOpen:radyo*S:{
if ($sockerr) { echo -a Error! | return }
sockwrite -tn $sockname GET / HTTP/1.1
sockwrite -tn $sockname $crlf
}
on *:Sockread:radyo*S:{
sockread %radyo
if (icy-name isin %radyo) { set %radyo2 %radyo2 ¿ $remove($gettok(%radyo,2,58),|) }
if (icy-genre isin %radyo) { set %radyo2 %radyo2 ¿ $remove($gettok(%radyo,2,58),|) }
if (icy-url isin %radyo) { set %radyo2 %radyo2 ¿ $remove(%radyo,icy-url:) | sockclose radyo | radyo2 }
}
on *:Sockclose:radyo*S:radyo2
alias radyo2 { sockopen $+(radyo,$r(1,9999),J) %site | unset %site }
on *:SockOpen:radyo*J:{
if ($sockerr) { echo -a Error! }
sockwrite -tn $sockname GET /7.html HTTP/1.0
sockwrite -tn $sockname User-Agent: Mozilla
sockwrite -tn $sockname
}
on *:Sockread:radyo*J:{
if ($sockerr) { echo -a Error! | return }
var %z
sockread %z
}
on *:SockClose:radyo*J:{
sockread -f %radyo
var %z $remove(%radyo,<HTML><meta http-equiv="Pragma" content="no-cache"></head><body>,</body></html>)
var %i $numtok(%z,44)
while %i {
set %radyo2 %radyo2 ¿ $remove($gettok(%z,%i,44),|)
dec %i
}
gostert
unset %radyo2
unset %radyo
}
alias -l gostert {
sockclose radyo*S
sockclose radyo*J
tokenize 191 %radyo2
; $1 = Dj's Name
; $2 = Genre
; $3 = URL
; $4 = Playing Song
; $5 = Quality Of Song
; $6 = Number Of Listener
; $7 = Max. Listener Number
; $8 & $9 = Listener Record
echo -a Name : $1
echo -a Genre : $2
echo -a URL : $3
echo -a Playing Song : $4
echo -a Quality Of Song : $5
echo -a Number Of Listener : $6
echo -a Max. Listener Number : $7
echo -a Listener Record : $8 & $9
}