TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,964
  • Latest: stylix
Stats
  • Total Posts: 195,933
  • Total Topics: 21,311
  • Online today: 959
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 746
  • Total: 746

Streaming Radio

Started by softtouch_ph, February 18, 2007, 11:12:48 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

softtouch_ph

This phpblock displays a combobox with multiple radio stations.
The user can select the station and click the "Play" button.
It popup a small window with the player.

Create a folder in your forum path, like "radio" (as used in the code below)
Create in this folder for each station a small html file as seen below.
The embedded source is the radio stream (.asx).

<HTML>
<BODY>
<TITLE>Station 1</TITLE>
<EMBED SRC="http://globe-ss.dagupan.com:8080/jam883.asx"  HEIGHT="42" WIDTH="100%" AUTOSTART="TRUE">
</BODY>



Next, paste the code below into a phpblock and adjust the path.
The first path ( <center><img src="'.$boardurl.'/radio/radio.gif" align="absmiddle"> ) should point top the attached gif file, inside your radio folder.
The 2nd. path ( <option value="'.$boardurl.'/radio/station1.htm">Station 1</option> ) is the path to the created html file.
You can add as many stations as you like, just create for each the html file and add the <option entry


global $boardurl;

echo '

<html>
<head>
<title></title>
<script language="JavaScript" type="text/javascript"><!--

var windowDoPop;
function go(whichURL)
{
    windowDoPop=window.open(whichURL[whichURL.selectedIndex].value,\'doPop\',\'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=200,height=75\');
    windowDoPop.focus();
}
//--></script>

</head>
<body>

<FORM>
<center><img src="'.$boardurl.'/radio/radio.gif" align="absmiddle">
<br /><br />
<SELECT NAME="SelectURL" size="1">
<option value="'.$boardurl.'/radio/station1.htm">Station 1</option>
</SELECT><br />
<INPUT TYPE="button" VALUE="Listen Radio" onClick="go(this.form.SelectURL.options)"><br />
<font size="1">(Radio stations may not broadcast all the time.)</font>
</FORM>
</center>
</body>
</html>
';


Just google for radio station which provide an .asx stream.

Crip

I have become comfortably numb!

Cripzone | Crip's Free 2.0.2 Themes



softtouch_ph

#2
On my site at http://www.cebucityforum.com, on the right side, near bottom. But only for registered user. I won't create a test account, we had spammer problems and I do not want to have this all over again...

cubsfanbudmn

Here is a new package that was just redone its a great radio mod. I got all my stations right of my winamp player made it nice and easy. i havent seen this posted yet at smf so i thought i would post it here. I had to get it straight from the authors site. And its in spanish  i thought i would save you all the trouble. 

softtouch_ph

Quote from: cubsfanbudmn on February 19, 2007, 05:36:59 AM
Here is a new package that was just redone its a great radio mod. I got all my stations right of my winamp player made it nice and easy. i havent seen this posted yet at smf so i thought i would post it here. I had to get it straight from the authors site. And its in spanish  i thought i would save you all the trouble. 

It depends on winamp?

cubsfanbudmn

No not at all i just use winamp as a place to find the stations. You just browse winamp find a station you like open it then veiw the file info for the http string you need for the station. Pretty easy beats searching the net for stations.

ianus

#6
Greetings

I have tried this nice snipp.
You can see the result at my testing board.
Thats important - testing! So everything (and all the nothing) looks not nice at all.

I will delete this board in the near future and will offer the new link when its all done.
Until look at
link outdated & deleted
for a small Demo.

getslamed

#7
This is a great snipp. Did a little changing to the source htlms to accommodate my shoutcast stream and am running some cool players. WMP player are still available but added a now playing window.  *two thumbs up*  :up: :up:


Zetan

looks great :) though the Now Playing seems to be in a strange position.. just kinda floating over the login area.

I might look at this. I bought Wimpy Player, the full version after being led to believe that it would work with my shoutcast streams.

Well, it only works through a proxy. Money wasted!


ZTN

getslamed

I"m having to redo the full players cuz some reason having 2 TP blocks was causing it to read the larger pop-up window only and I didn't double check it before I posted.

Sorry bout the wimpy player.  The palyer I'm using is a java player and I know a lot of people don't like the memory intensity of java but once its loaded it only runs the shoutcast stream and draw no more. I'm just lovin the heck out of it. 

This website is proudly hosted on Crocweb Cloud Website Hosting.