gtavc1210
05-02-2008, 11:29 PM
Here is the code,
i made it for my site originally then i used it on HabboHarmony.net
Now here it is for you
<?
ob_start();
switch($_GET[type])
{
case "asx":
header("Cache-control: public");
header("Content-Type: video/x-ms-asf;");
header("Content-Disposition: inline; filename=\"YOUR_SITE_NAME.asx\"");
?>
<ASX VERSION="3.0">
<ENTRY>
<REF HREF="http://shoutcast.net:8000" />
</ENTRY>
</ASX>
<?
break;
case "asx_listen":
header("Cache-control: public");
header("Content-Type: video/x-ms-asf;");
?>
<ASX version = "3.0">
<Entry>
<title>YOUR SITE NAME</title>
<AUTHOR>YOURSITE</AUTHOR>
<COPYRIGHT>© 2008 onwards</COPYRIGHT>
<!--
<Logo href = "" Style = "MARK" />
-->
<Ref href = "http://shoutcast.net:8000" />
</Entry>
</ASX>
<?
break;
case "pls":
header("Cache-control: public");
header("Content-Type: audio/x-scpls;");
header("Content-Disposition: inline; filename=\"YOUR_SITE_NAME.pls\"");
?>
[playlist]
NumberOfEntries=1
File1=http://shoutcast.net:8000
Title1=FsPortal Live
Length1=-1
<?
break;
case "m3u":
header("Content-Type: audio/x-mpegurl");
header("Content-Disposition: inline; filename=\"YOUR_SITE_NAME.m3u\"");
// let's generate the content;
echo "#EXTM3U\n";
echo "#EXTINF:-1,http://shoutcast.net:8000\n";
echo "http://shoutcast.net:8000";
break;
case "ram":
header("Cache-control: public");
header("Content-Type: audio/x-pn-realaudio;");
header("Content-Disposition: inline; filename=\"YOUR_SITE_NAME.ram\"");
?>
<? echo(http://shoutcast.net:8000); ?>
<?
break;
}
ob_end_flush();
?>
Its very easy to link it into a database and use it as a dynamic script.
Also its good for integrating for cross browser compatibility for your radio
<object classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" name="player" width="175" height="45" standby="Loading" codebase="/CODEBASE=http:/activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715">
<param name="" id="" player="player" url="" value="true" />
<param name="CONTROLS" value="Imagewindow" />
<param name="ShowStatusBar" value="false" />
<param name="src" value="listenlive.php?type=asx" />
<param name="url" value="listenlive.php?type=asx" />
<param name="autostart" value="true" />
<param name="autoplay" value="true" />
<param name="Controls" value="playbutton" />
<param name="shuffle" value="1" />
<param name="uimode" value="mini" />
<embed src="listenlive.php?type=asx" width="199" height="45" autostart="True" controls="playbutton" showstatusbar="false" url="http://habboharmony.net/radio/listenlive.php?type=asx" autoplay="true" uimode="mini" shuffle="true"> </embed>
</object>
Hope it comes in useful,
I offer no support for this script if it doesen't work for you then you have edited something that you shouldn't have
i made it for my site originally then i used it on HabboHarmony.net
Now here it is for you
<?
ob_start();
switch($_GET[type])
{
case "asx":
header("Cache-control: public");
header("Content-Type: video/x-ms-asf;");
header("Content-Disposition: inline; filename=\"YOUR_SITE_NAME.asx\"");
?>
<ASX VERSION="3.0">
<ENTRY>
<REF HREF="http://shoutcast.net:8000" />
</ENTRY>
</ASX>
<?
break;
case "asx_listen":
header("Cache-control: public");
header("Content-Type: video/x-ms-asf;");
?>
<ASX version = "3.0">
<Entry>
<title>YOUR SITE NAME</title>
<AUTHOR>YOURSITE</AUTHOR>
<COPYRIGHT>© 2008 onwards</COPYRIGHT>
<!--
<Logo href = "" Style = "MARK" />
-->
<Ref href = "http://shoutcast.net:8000" />
</Entry>
</ASX>
<?
break;
case "pls":
header("Cache-control: public");
header("Content-Type: audio/x-scpls;");
header("Content-Disposition: inline; filename=\"YOUR_SITE_NAME.pls\"");
?>
[playlist]
NumberOfEntries=1
File1=http://shoutcast.net:8000
Title1=FsPortal Live
Length1=-1
<?
break;
case "m3u":
header("Content-Type: audio/x-mpegurl");
header("Content-Disposition: inline; filename=\"YOUR_SITE_NAME.m3u\"");
// let's generate the content;
echo "#EXTM3U\n";
echo "#EXTINF:-1,http://shoutcast.net:8000\n";
echo "http://shoutcast.net:8000";
break;
case "ram":
header("Cache-control: public");
header("Content-Type: audio/x-pn-realaudio;");
header("Content-Disposition: inline; filename=\"YOUR_SITE_NAME.ram\"");
?>
<? echo(http://shoutcast.net:8000); ?>
<?
break;
}
ob_end_flush();
?>
Its very easy to link it into a database and use it as a dynamic script.
Also its good for integrating for cross browser compatibility for your radio
<object classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" name="player" width="175" height="45" standby="Loading" codebase="/CODEBASE=http:/activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715">
<param name="" id="" player="player" url="" value="true" />
<param name="CONTROLS" value="Imagewindow" />
<param name="ShowStatusBar" value="false" />
<param name="src" value="listenlive.php?type=asx" />
<param name="url" value="listenlive.php?type=asx" />
<param name="autostart" value="true" />
<param name="autoplay" value="true" />
<param name="Controls" value="playbutton" />
<param name="shuffle" value="1" />
<param name="uimode" value="mini" />
<embed src="listenlive.php?type=asx" width="199" height="45" autostart="True" controls="playbutton" showstatusbar="false" url="http://habboharmony.net/radio/listenlive.php?type=asx" autoplay="true" uimode="mini" shuffle="true"> </embed>
</object>
Hope it comes in useful,
I offer no support for this script if it doesen't work for you then you have edited something that you shouldn't have