Webradio

Status
Niet open voor verdere reacties.

roylodder

Gebruiker
Lid geworden
26 mrt 2006
Berichten
125
hallo,

Ik heb een web-radio site maar wil het qua script veranderen. De media-player (embed) en de links staan in dezelfde file. Ik wil nu een site maken met joomla en de player en de media player en de links in een apart script. Kan ik een embed media player aansturen vanuit een ander php bestand als deze op dezelfde pagina staan?

Ik heb dan een lijst met links in bijv. link.php staan en de mediaplayer in bijv player.php, deze files worden dan op dezelfde pagina weergegeven. Player.php in de left module en link.php in de main sectie.

Ik hoop dat dit mogelijk is. Dit zou namelijk heel makkelijk en mooi werken.


De php code voor de player zoals ik hem met een dropdown lijst gebruik:

Code:
<?php

defined( '_VALID_MOS' ) or die( 'Restricted access' );

$br = strtolower($_SERVER['HTTP_USER_AGENT']); // Browser em uso.

$estacao_def = $params->def( 'estacao_def' );

$height = $params->def( 'height' );

$width = $params->def( 'width' );

$logo = $params->def( 'logo' );

$escolher = $params->def( 'escolher' );

$est_01 = $params->def( 'est_01' );
$est_link_01 = $params->def( 'est_link_01' );

$est_02 = $params->def( 'est_02' );
$est_link_02 = $params->def( 'est_link_02' );

$est_03 = $params->def( 'est_03' );
$est_link_03 = $params->def( 'est_link_03' );

$est_04 = $params->def( 'est_04' );
$est_link_04 = $params->def( 'est_link_04' );

$est_05 = $params->def( 'est_05' );
$est_link_05 = $params->def( 'est_link_05' );

$est_06 = $params->def( 'est_06' );
$est_link_06 = $params->def( 'est_link_06' );

$est_07 = $params->def( 'est_07' );
$est_link_07 = $params->def( 'est_link_07' );

$est_08 = $params->def( 'est_08' );
$est_link_08 = $params->def( 'est_link_08' );

$est_09 = $params->def( 'est_09' );
$est_link_09 = $params->def( 'est_link_09' );

$est_10 = $params->def( 'est_10' );
$est_link_10 = $params->def( 'est_link_10' );

?>

<?
if ($logo == 'sim')
	{?>
     <img src="http://jfm.luisconduto.com/modules/lcplayer/lcplayer.jpg">
  <?}?>

<?
if(ereg("msie", $br))
   {?>
	<OBJECT ID="MediaPlayer" width="<?php echo $width;?>" height="<?php echo $height;?>"
    	classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6"
      	standby="Loading Microsoft Windows Media Player components..." type="application/x-oleobject">
      	<PARAM NAME="uiMode" value="mini">
      	<PARAM NAME="url" value="<?php echo $estacao_def;?>">
      	<PARAM NAME="autoStart" value="true">
      	<PARAM NAME="PlayCount" VALUE="9999">
      	<PARAM NAME="stretchToFit" VALUE="True">
      	<PARAM NAME="enableContextMenu" VALUE="False">
	</object>

<?if ($escolher == 's')
   {?>
	<br>
	<SELECT NAME="estacao" onChange="{document.MediaPlayer.FileName = document.MediaPlayer.url=document.getElementById('estacao').value}">
        <OPTION VALUE="<?php echo $est_link_01;?>"><?php echo $est_01;?>
        <OPTION VALUE="<?php echo $est_link_02;?>"><?php echo $est_02;?>
        <OPTION VALUE="<?php echo $est_link_03;?>"><?php echo $est_03;?>
        <OPTION VALUE="<?php echo $est_link_04;?>"><?php echo $est_04;?>
        <OPTION VALUE="<?php echo $est_link_05;?>"><?php echo $est_05;?>
        <OPTION VALUE="<?php echo $est_link_06;?>"><?php echo $est_06;?>
        <OPTION VALUE="<?php echo $est_link_07;?>"><?php echo $est_07;?>
        <OPTION VALUE="<?php echo $est_link_08;?>"><?php echo $est_08;?>
        <OPTION VALUE="<?php echo $est_link_09;?>"><?php echo $est_09;?>
        <OPTION VALUE="<?php echo $est_link_10;?>"><?php echo $est_10;?>
	</SELECT>
  <?}
   }
else
   {?>
  <script type="text/javascript">
  <!--
	function song(){
	document.getElementById('music1').innerHTML="<embed type='application/x-mplayer2' id='music2' pluginspage='http://www.microsoft.com/Windows/MediaPlayer/' src='"+document.getElementById('estacao').value+"' name='MediaPlayer1' width='<?php echo $width;?>' height='<?php echo $height;?>' controltype='2' showcontrols='1' showstatusbar='1' AutoStart='true'></embed>";
	}
  //-->
  </script>
  <div id="jukebox">
	<span id="music1"><embed type="application/x-mplayer2" id="music1"
		pluginspage="http://www.microsoft.com/Windows/MediaPlayer/"
		src="<?php echo $estacao_def;?>"
		name="MediaPlayer1"
		width="<?php echo $width;?>"
		height="<?php echo $height;?>"
		controltype="2"
		showcontrols="1"
		showstatusbar="1"
		AutoStart="1">
	</embed></span>
  </div>
   <?if ($escolher == 's')
	{?>
    <select id="estacao" onchange="song()" size="1">
        <OPTION VALUE="<?php echo $est_link_01;?>"><?php echo $est_01;?>
        <OPTION VALUE="<?php echo $est_link_02;?>"><?php echo $est_02;?>
        <OPTION VALUE="<?php echo $est_link_03;?>"><?php echo $est_03;?>
        <OPTION VALUE="<?php echo $est_link_04;?>"><?php echo $est_04;?>
        <OPTION VALUE="<?php echo $est_link_05;?>"><?php echo $est_05;?>
        <OPTION VALUE="<?php echo $est_link_06;?>"><?php echo $est_06;?>
        <OPTION VALUE="<?php echo $est_link_07;?>"><?php echo $est_07;?>
        <OPTION VALUE="<?php echo $est_link_08;?>"><?php echo $est_08;?>
        <OPTION VALUE="<?php echo $est_link_09;?>"><?php echo $est_09;?>
        <OPTION VALUE="<?php echo $est_link_10;?>"><?php echo $est_10;?>
    </select>
    <?}
   }?>

De link.php code:

Code:
<?php 
        if(isset($_GET['link'])){ 
             $radiozender = $_GET['link']; 
             }else{$radiozender = "tmf-radio"; $img = "images/tmf-radio.gif"; $alt = "TMF Radio";}
if($radiozender == "100pnl"){$link = "mms://wm1.streaming.castor.nl/castor=100pctnlwm"; $img = "images/radio/100pnl.gif"; }
if($radiozender == "3fm"){$link = "http://streams.planet.nl/cgi-bin/reflector.cgi?stream=streamgate46"; $img = "images/radio/3fm.gif"; }
if($radiozender == "juizefm"){$link = "http://streamers.at.sara.garnierprojects.com/juizefm_high"; $img = "images/radio/juizefm.gif"; }
if($radiozender == "veronica"){$link = "http://www.garnierstreamingmedia.com/asx/veronicaradio.asp"; $img = "images/radio/veronicafm.gif"; }
if($radiozender == "smashfm"){$link = "http://www.smashfm.nl/stream/smashfm.php"; $img = "images/radio/smashfm.gif"; }
if($radiozender == "tmf-live"){$link = "http://streams.mtvnetworks.nl/cgi-bin/reflector.cgi?stream=tmf_audio&title=TMF%20Live%20TV%20Audio%20Stream"; $img = "images/radio/tmf-live.gif"; }
if($radiozender == "tmf-radio"){$link = "http://www.garnierstreamingmedia.com/asx/streamerswitch.asp?stream=104"; $img = "images/radio/tmf-radio.GIF"; }
if($radiozender == "radio538"){$link = "http://www.garnierstreamingmedia.com/asx/radio538.asp"; $img = "images/radio/radio538.gif"; }
if($radiozender == "q-music"){$link = "http://www.q-music.nl/asx/q-music.asx"; $img = "images/radio/qmusic.gif"; }
if($radiozender == "radionl"){$link = "http://www.radionl.fm/stream/listen.asx"; $img = "images/radio/radionl.gif"; }
if($radiozender == "slamfm"){$link = "http://www.slamfm.nl/stream/slamfm.asx"; $img = "images/radio/slamfm.gif"; }
if($radiozender == "freshfm"){$link = "http://www.fresh.fm/media/audio/FreshFM.asx"; $img = "images/radio/freshfm.gif"; }
if($radiozender == "xfm"){$link = "http://breedband.xfm.nl:8100"; $img = "images/radio/xfm.gif"; }
if($radiozender == "caz"){$link = "http://www.garnierstreamingmedia.com/asx/caz_audio_01.asp"; $img = "images/radio/caz.gif"; }
if($radiozender == "skyradio"){$link = "http://www.garnierstreamingmedia.com/asx/skyradio.asp"; $img = "images/radio/skyradio.gif"; }
if($radiozender == "rgr"){$link = "http://streams.lazernet.be:2620"; $img = "images/radio/rgr.gif"; }
if($radiozender == "rtlfm"){$link = "http://media.rtl.nl/rtlfm/livestream/rtlfmbroad.asx"; $img = "images/radio/rtlfm.gif"; }
if($radiozender == "radio5"){$link = "http://streams.planet.nl/cgi-bin/reflector.cgi?stream=streamgate50"; $img = "images/radio/radio5.gif"; }
if($radiozender == "smartfm"){$link = "http://www.smartfm.nl/smartfm.asx"; $img = "images/radio/smartfm.gif"; }
if($radiozender == "beatradio"){$link = "http://www.beatradio.nl/beatradio.asx"; $img = "images/radio/beatradio.gif"; }
if($radiozender == "realhardcoreradio"){$link = "http://www.hardcoreradio.nl/rhr.asx"; $img = "images/radio/realhardcore.gif"; }
if($radiozender == "aardschok"){$link = "http://www.garnierstreamingmedia.com/asx/aardschok.asp"; $img = "images/radio/aardschok.gif"; }
if($radiozender == "fearfm"){$link = "http://www.fearfm.nl/2fm.asx"; $img = "images/radio/fearfm.gif"; }
if($radiozender == "funx"){$link = "mms://funx.xs4all.nl/funx"; $img = "images/radio/funx.gif"; }
if($radiozender == "radio4"){$link = "http://streams.planet.nl/cgi-bin/reflector.cgi?stream=streamgate47"; $img = "images/radio/radio4.gif"; }
if($radiozender == "classx"){$link = "http://streamers.at.sara.garnierprojects.com/kinkfm_classx"; $img = "images/radio/classx.gif"; }
if($radiozender == "laserradio"){$link = "http://abmedia.goldenxs.nl:8001/laserradio"; $img = "images/radio/laserradio.gif"; }
if($radiozender == "kinkfm"){$link = "http://www.garnierstreamingmedia.com/asx/kinkfm.asp"; $img = "images/radio/kinkfm.gif"; }
if($radiozender == "527fm"){$link = "http://www.527FM.nl/streams/high.asx"; $img = "images/radio/527fm.gif"; }
if($radiozender == "brightfm"){$link = "http://www.bright-media.nl/nederlandfm.asx"; $img = "images/radio/brightfm.gif"; }
if($radiozender == "donna"){$link = "http://mp3.streampower.be/donna-high"; $img = "images/radio/donna.gif"; }
if($radiozender == "radio10gold"){$link = "http://www.radio10gold.nl/page/asx/"; $img = "images/radio/radio10gold.gif"; }
if($radiozender == "arrow"){$link = "mms://arrowstream.atinet.nl/arrowrock"; $img = "images/radio/arrow.gif"; }
if($radiozender == "bnn"){$link = "http://wmplayer.bnn.fm"; $img = "images/radio/bnn.gif"; }
if($radiozender == "bnr"){$link = "http://streams.kpnwebcast.nl/cgi-bin/reflector.cgi?stream=kpnmms_bnr,kpnmms_bnr2&title=BN.nl live radio"; $img = "images/radio/bnr.gif"; }
if($radiozender == "concertzender"){$link = "http://www.omroep.nl/concertzender/live64.asx?concertzender"; $img = "images/radio/concertzender.gif"; }
if($radiozender == "gigantfm"){$link = "http://www.gigantfm.nl/listen/listen.asx"; $img = "images/radio/gigantfm.gif"; }
if($radiozender == "libelle"){$link = "http://ice1.streamzilla.jet-stream.nl:8000/ilsemedia=ice2"; $img = "images/radio/libelle.gif"; }
if($radiozender == "nashvillefm"){$link = "http://breedband.nashvillefm.net:8060/"; $img = "images/radio/nashvillefm.gif"; }
if($radiozender == "gamesfm"){$link = "http://nederlandfm.gamesfm.nl:8300"; $img = "images/radio/gamesfm.gif"; }
if($radiozender == "hottracksfm"){$link = "http://www.hottracksfm.nl/playlist.asx"; $img = "images/radio/hottracksfm.gif"; }
if($radiozender == "classicfm"){$link = "http://www.garnierstreamingmedia.com/asx/classicfm.asp"; $img = "images/radio/classicfm.gif"; }
if($radiozender == "radio2"){$link = "http://streams.planet.nl/cgi-bin/reflector.cgi?stream=streamgate44"; $img = "images/radio/radio2.gif"; }
if($radiozender == "radio1"){$link = "http://streams.planet.nl/cgi-bin/reflector.cgi?stream=streamgate42"; $img = "images/radio/radio1.gif"; }
if($radiozender == "contact"){$link = "mms://mediaserver02.cybernet.be/contactnl"; $img = "images/radio/contact.gif"; }
if($radiozender == "deepfm"){$link = "http://www.deep.fm/play/128K.asx"; $img = "images/radio/deepfm.gif"; }
if($radiozender == "flashfm"){$link = "http://www.flashfm.nl/files/flashfm.asx"; $img = "images/radio/flashfm.gif"; }
if($radiozender == "royalradio"){$link = "http://www.royal-radio.com/royal-radio.asx"; $img = "images/radio/royalradio.gif"; }
if($radiozender == "hot108"){$link = "http://www.hot108.com/hot108jamz.asx"; $img = "images/radio/hot108.gif"; }
if($radiozender == "apcsradio"){$link = "http://server6.digital-webstream.de:21040"; $img = "images/radio/apcsradio.gif"; }
if($radiozender == "totaalfm"){$link = "http://84.244.180.117:8026"; $img = "images/radio/totaalfm.gif"; }
if($radiozender == "mascotteradio"){$link = "http://mascotteradio.traffichosting.nl:7605"; $img = "images/radio/mascotte.gif"; }
if($radiozender == "qfunk"){$link = "http://stream01.pcextreme.nl:9165/stream"; $img = "images/radio/qfunk.gif"; }
if($radiozender == "profm"){$link = "http://www.pro-fm.net/modules/streams/listen.asx"; $img = "images/radio/profm.gif"; }
if($radiozender == "mohradio"){$link = "http://www.mohradio.com/p/mohradio.asx"; $img = "images/radio/mohradio.gif"; }
if($radiozender == "trackfm"){$link = "http://82.94.255.190:8000/high"; $img = "images/radio/trackfm.gif"; }

if($radiozender == "bembem"){$link = "mms://clusterstreamhobo.telenet-ops.be/Plopsa_high"; $img = "images/radio/bembem.gif"; }
if($radiozender == "kinderradio"){$link = "http://stream.kinderradio.fm/kinderradio"; $img = "images/radio/kinderradio.gif"; }
if($radiozender == "candlelight"){$link = "http://ice1.streamzilla.jet-stream.nl:8000/ilsemedia=ice7"; $img = "images/radio/candlelight.gif"; }
if($radiozender == "starfm"){$link = "http://streamserver6.telconet.nl:9700"; $img = "images/radio/starfm.gif"; }
if($radiozender == "bingofm"){$link = "http://media.rtvutrecht.nl/bingofm_hi"; $img = "images/radio/bingofm.gif"; }

?>
 
Laatst bewerkt:
heb je misschien tips hoe ik dit kan toepassen of goede tutorials?
Zou vet zijn als dit werkt, heb namelijk een vette template gebouwd die ik niet wil aanpassen.
 
Status
Niet open voor verdere reacties.
Terug
Bovenaan Onderaan