Skip to content
General Chat Talk

Radio Code

A TG007 community discussion started by JOhnson.

Discussion 45 posts
Page 2 of 3
Open
Topic #15161 · 45 published posts · 10,362 views

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.

 

:lmaojump: thank you for your reply .. at the moment the radio is running ok so no need to change the server ... Question ? where do I get the Radio ID ? as when I open my "Streaming Details" it only gives me my ip= and port= so iv no idea where to look for that Radio ID ... as always thank you for your help and reply :D

you view the page in your browser and right click and view page source so you can see the html code.. then you search

Get information about ircWx here

you view the page in your browser and right click and view page source so you can see the html code.. then you search

 

:lmaojump: ok as always thank you for your help and also thank you for the code and I worked out where to go and what to do :lolwave: cheers err0r :D

err0r, If you see this. I could use some help on the HTTP:/1 I can't find it in the source code http://www.cosyclanradio.com And to be totally inclusive, there is an Audio Realm and Shoutcast page for this one stream, I've looked on all View Source Pages and am still missing something.

Edited Apr 27, 2013 5:24 PM by TacticalThunder

This should work to get song playing

menu channel {
  Radio Test
  .Set Channel: { set %radiotest.room $$?="Full Channel Name" }
  .$iif($timer(.radiotest),$style(2)) Turn On: { radiotest | .timer.radiotest 0 10 radiotest | echo -a radiotest msg on }
  .$iif(!$timer(.radiotest),$style(2)) Turn Off: { unset %radiotest.song | .timer.radiotest off | echo -a radiotest msg off }
}
alias radiotest { sockclose radiotest | sockopen radiotest 96.31.83.87 8037 }
on *:sockopen:radiotest: { 
  sockwrite -n $sockname GET /7.html HTTP/1.1
  sockwrite -n $sockname User-Agent: SHOUTcast Song Status (Mozilla  Compatible)
  sockwrite -n $sockname Host: $+(96.31.83.87,:,8037)
  sockwrite -n $sockname $crlf
}
on *:sockread:radiotest: {
  if ($sockerr > 0) return
  var %radiotest | sockread -fn %radiotest
  if ($regex(%radiotest,/<body>(.*)<\/body>/)) { 

    set %radiotest.song $gettok($regml(1),7-,44)
    if (%radiotest.song != %radiotest.lastsong) {
      set %radiotest.lastsong %radiotest.song
      msg %radiotest.room Now playing on CosyClanRadio.com - %radiotest.song

    } 
  }
}

Get information about ircWx here

Sorry err0r, that didn't work, but I'm gonna get this working if it kills me. Thanks. Might help you to know it is for Sparkpea.

 

TT

hmm it worked fine for me

did you set the roomname and turn it on in the menu?

 

eshot_48621214.jpg

Edited Apr 28, 2013 4:39 AM by err0r

Get information about ircWx here

worked for me also in IRC server, maybe you didnt set the channel room correct jeff

Edited Apr 28, 2013 2:09 PM by chain

______________________________________________________

T.ogether
E.veryone
A.chieves
M.ore


 

 

coderirclogo.png.8580c336378f27471a13a95ffd242c9d (1).png

err0r, I unloaded it, restarted the script, Loaded up the code again, still nothing. I'm using irc %#roomname Is that what is messing it up?

 

TT

Ok if your using Buzzen it's %#roomname if its irc its #roomname both working for me bro!! also look into the variables of the script and see if you have this in it %radiotest.room %#AFriendlyChat if it is give it a few mins to play with new song!!

Edited Apr 28, 2013 9:02 PM by chain

______________________________________________________

T.ogether
E.veryone
A.chieves
M.ore


 

 

coderirclogo.png.8580c336378f27471a13a95ffd242c9d (1).png

Actually it's over on SPCN Chain.

<p>updated a bit.</p>

<pre class="_prettyXprint">

menu channel {

Radio Test

.Set Channel: { set %radiotest.room $$?="Full Channel Name" }

.$iif($timer(.radiotest),$style(2)) Turn On: { radiotest | .timer.radiotest 0 10 radiotest | echo -a radiotest msg on }

.$iif(!$timer(.radiotest),$style(2)) Turn Off: { unset %radiotest.song | unset %radiotest.lastsong | .timer.radiotest off | echo -a radiotest msg off }

}

alias radiotest { sockclose radiotest | sockopen radiotest 96.31.83.87 8037 }

on *:sockopen:radiotest: {

sockwrite -n $sockname GET /7.html HTTP/1.1

sockwrite -n $sockname User-Agent: SHOUTcast Song Status (Mozilla Compatible)

sockwrite -n $sockname Host: $+(96.31.83.87,:,8037)

sockwrite -n $sockname $crlf

}

on *:sockread:radiotest: {

if ($sockerr > 0) return

var %radiotest | sockread -fn %radiotest

if ($regex(%radiotest,/<body>(.*)<\/body>/)) {

 

set %radiotest.song $gettok($regml(1),7-,44)

if (%radiotest.song != %radiotest.lastsong) {

 

msg %radiotest.room Now playing on CosyClanRadio.com - %radiotest.song

set %radiotest.lastsong %radiotest.song

}

}

}

</pre>

Edited May 1, 2013 7:47 AM by err0r

Get information about ircWx here

Thanks again for your help yesterday err0r and Chain, sorry I missed you Chain. This created a new problem, Super trivia now doesn't like the new mIRC, so I am working an a work around for it. Any one have any suggestions, let me know. Thanks

 

 

TT

is that johnson still pestering you err0r

i am going to have to pay him a visit lol

My code does NOT have bugs. It just develops random features.

lol he is pissed at me

Get information about ircWx here

:oops: I am not pissed at you just f ing mad at you :lolwave: and Ozzy you have been saying that for years and tell me fella do you still have a horse or horses .... I might not be as good as you boys at scripting but I knows my horses :lolwave:

<bcry> I have edited this code that err0r gave to one or two other radio's but for some reason its not working for me ... any idea what iv done wrong :D the ip is correct and the port is correct ... hope to hear from you soon :lolwave: thanks for any replies :D

 

menu channel {
-
Magic
.Set Channel: { set %magicroom $chan | echo -a channel : %magicroom }
.$iif($timer(.magic),$style(2)) Turn On: { magic | .timer.magic 0 10 magic | echo -a magic msg on }
.$iif(!$timer(.magic),$style(2)) Turn Off: { unset %magic.song | .timer.magic off | echo -a magic msg off }
}
alias magic { sockclose magic | sockopen magic 91.121.195.222 8104 }
on *:sockopen:magic: {
sockwrite -n $sockname GET /7.html HTTP/1.1
sockwrite -n $sockname User-Agent: SHOUTcast Song Status (Mozilla Compatible)
sockwrite -n $sockname Host: $+(91.121.195.222,:,8104)
sockwrite -n $sockname $crlf
}
on *:sockread:magic: {
if ($sockerr > 0) return
var %magic | sockread -fn %magic
if ($regex(%magic,/<body>(.*)<\/body>/)) {

set %magic.song $gettok($regml(1),7-,44)
if (%magic.song != %magic.lastsong) {

msg %magic.room Now playing on The Magic Radio - %magic.song (8) http://myradiostream.com/32/8104(8)
set %magic.lastsong %magic.song
}
}
}

;credit err0r www.tg007.net

 

what are the stations.

Get information about ircWx here

:lmaojump: you know me :lolwave: iv joined http://myradiostream.com/32/8104 if that is any help to you ... it has an Ip and a port and that is about all I really knows ... unless you knows something I dont ... :lolwave: for godsake dont ask Pk :D the radio station is named The Magic Radio ? again if that is any help to you and again thank you for your reply ... as Ozzy sed is that Johnson doing your brains in ... tell him YES :lolwave: thanks again err0r I will leave it in your hands and hope you come up with the right answer :D

i'll have to check when you are on air sometime.

Get information about ircWx here