Skip to content
General Chat Talk

Radio Code

A TG007 community discussion started by JOhnson.

Discussion 45 posts
Page 1 of 3
Open
Topic #15161 · 45 published posts · 10,369 views

:lmaojump: as a few of you know I do a basic shoutcast listen2myradio which is free in spcn ... iv been looking in the snippets and spotted the snippet Shout Cast Radio Spammer Sock Bot iv tried to edit for spcn and have failed as always :lolwave: does this code only work for a hosted radio ? or will it work for a basic shoutcast listen2myradio and if so would someone give me a hand when there not to busy :lolwave: as always thanks to anyone who replies to this :D

 

omg he is back ... everyone dives under the bed ... and is Ozzy still on sick leave :D

give me the info and I'll come up with something for it.

Get information about ircWx here

give me the info and I'll come up with something for it.

 

:lmaojump: listen err0r when your not to busy just reply to this and tell me what info you need ... and thanks again for the reply :D

link to your stream and such.

Get information about ircWx here

link to your stream and such.

 

:oops: Hope this the info you need err0r and thanks again

 

http://independent.listen2myradio.com

 

address to broadcast: 109.169.47.158 Port:9522

didn't i already make one for you before?

Get information about ircWx here

didn't i already make one for you before?

 

:oops: yes you did it worked for a while then stopped working so I put it on one of my pen drives and lost the pen drive ... then I see this in snippets "Shout Cast Radio Spammer Sock Bot" and thought I might be able to get that to work but as I sed I failed :( and the only reason I could think that it failed is because the snippet looks like it is for a hosted internet radio and not a free one like iv got (maybe im wrong) as always err0r thanks for help and the reply :D

i'll see if i still have the one i made you and fix it to work again.. if not i'll make another.

Get information about ircWx here

be helpful if you could turn your radio on as well so i can test the code

Get information about ircWx here

Quick Code

menu channel {
  My Radio
  .Set Channel: { set %myradioroom $$?="Full Channel Name" }
  .$iif($timer(.myradio),$style(2)) Turn On: { myradio | .timer.myradio 0 10 myradio | echo -a myradio msg on }
  .$iif(!$timer(.myradio),$style(2)) Turn Off: { unset %myradio.song | .timer.myradio off | echo -a myradio msg off }
}
alias myradio { sockclose myradio | sockopen myradio 109.169.47.158 80 }
on *:sockopen:myradio: { 
  if ($sockerr) { echo -a $sockerr | sockclose $sockname | halt }
  sockwrite -n $sockname POST /chat/fr2.php?ip=109.169.47.158&port=9522&ip1=&ip2=&ip3=&show=&b=1&radioid=1177905 HTTP/1.0
  sockwrite -n $sockname Host: 109.169.47.158
  sockwrite -n $sockname $crlf
}
on *:sockread:myradio: {
  if ($sockerr > 0) return
  var %myradio | sockread %myradio
  if ($regex(%myradio,/<center>Song :  (.*?)<\/body></html> <\/body>/)) { 
	if ($regml(1) == Radio Status : Off) { sockclose $sockname | halt }
	if (%myradio.song != $regml(1)) && ($regml(1) != $null) { set %myradio.song $regml(1) | msg %myradioroom Now playing: $regml(1) on http://independent.listen2myradio.com }
	sockclose $sockname 
  }
}
Edited Jul 18, 2011 6:04 PM by err0r

Get information about ircWx here

:lmaojump: Thank you err0r it works in buzzen and it works in spcn but in spcn and I dont know about buzzen it will not except a room that has spaces in it i.e The Music Room ... BUT :lolwave: it will except TheMusicRoom but I will sort that out myself ... I would just like to say thank you again and iv put the code in my x-drive and im sure I wont lose the x-drive :D

you have to replace the spaces with \b like %#The\bMusic\bRoom

Get information about ircWx here

you have to replace the spaces with \b like %#The\bMusic\bRoom

 

:oops: err0r that works fine in buzzen :lolwave: but not in spcn but hell fella I will shorten my room name as im over the moon wiv the code working and im not touching anything as its working :D ... as aways err0r thanks for your help :D

type this in your script and u can get the exact room name you will need... //echo -a $active

 

you can also change the menu for adding channel

 

menu channel {
  My Radio
  .Set Channel: { set %myradioroom $chan | echo -a channel : %myradioroom  }
  .$iif($timer(.myradio),$style(2)) Turn On: { myradio | .timer.myradio 0 10 myradio | echo -a myradio msg on }
  .$iif(!$timer(.myradio),$style(2)) Turn Off: { unset %myradio.song | .timer.myradio off | echo -a myradio msg off }
}
Then you can simply set it by being in that room.
Edited Jul 18, 2011 11:16 PM by err0r

Get information about ircWx here

:lmaojump: wow err0r thanks again that works a treat and I dont have to change my room name now :D I also edit this line:

 

msg %myradioroom Now playing: $regml(1)http://independent.listen2myradio.com }

To this but was worried it wouldnt work but it does :D

 

msg %myradioroom DJ Danny Martin Is Now Playing: $regml(1) } 

as always you dont know how thankful I am fella ... thank you :D

you are welcome

Get information about ircWx here

:lmaojump: err0r question ? if I have to change my server on the radio will I have to annoy you :P for you to get the code to work again as tonight the radio was buffering and people had to wait till it worked ... but I left it as it was for now :D as always thank you for any reply :D
Edited Aug 8, 2011 12:46 AM by JOhnson

just get with me and i will show you how to get the code u need

Get information about ircWx here

just get with me and i will show you how to get the code u need

 

:oops: where do I get with you :lolwave:

what you have to edit is the IP / PORT / and Radio ID

 

sockwrite -n $sockname POST /chat/fr2.php?ip=109.169.47.158&port=9522&ip1=&ip2=&ip3=&show=&b=1&radioid=1177905 HTTP/1.0

if you edit those in the above and in the sockopen and host it should work..

 

you can get the info just by viewing the source of your radio page.

 

 

Get information about ircWx here