//**************************************
//
// Name: a simple way to stream mp3 file
// s without mod_mp3
// Description:This code makes it possib
// le for you to stream any mp3 file on the
// internet. It does NOT need mod_mp3. It's
// complete, and ready to go.
// By: Digital
//
// Inputs:$loc == the location of the mp
// 3 file
$Play == "yes" to play the file, or not defined to just prompt
//
// Returns:the sweet nectar of streaming
// mp3 music
//
// Assumes:this is stupid easy to use.
//
// Side Effects:internal bleeding, spont
// anious combustion, uncontrolable vomitti
// ng
//
//This code is copyrighted and has // limited warranties.Please see http://
// www.Planet-Source-Code.com/vb/scripts/Sh
// owCode.asp?txtCodeId=383&lngWId=8 //for details. //**************************************
//
<?
// This Program was written by Digital -
// - digital@de-net.org
// Any copying without my concent will g
// et you killed by cuban snipers.
// http://www.de-net.org
if (!$Play)
{
?>
<html>
<head>
<title>DE-Network Mp3 Streamer</title>
<style TYPE="text/css">
A:link
{
COLOR: #00007D;
TEXT-DECORATION: none
}
A:visited
{
TEXT-DECORATION: none
}
A:active
{
TEXT-DECORATION: none
}
A:hover
{
COLOR: #D90000
}
</style>
</head>
<body topmargin="0" leftmargin="0" bgcolor="#000000" text="#FFFFFF">
<div align="left">
<table border="0" width="100%" height="100%" cellspacing="0" cellpadding="0" bordercolor="#FFFFFF" bgcolor="#000000">
<tr>
<td width="100%" height="50%" valign="bottom">
<p align="center"><img border="0" src="http://www.de-net.org/insomnia/images/de-network.gif" width="589" height="202"></td>
</tr>
<tr>
<td width="100%" height="48%" valign="top">
<b>
<form action=<? echo $PHP_SELF; ?> method=POST>
<p align="center">
<font face="Verdana,Arial" size="3" color="#C0C0C0">
Enter the URL of an mp3 file:<br><input type="text" value="<? echo $loc; ?>" name="loc">
<input type="submit" value="Play" name="Play">
<br><br><font size=2>
To use this script seemlessly in your website, pass variables to this script like this:</b><br>
<a href="<i>http://www.de-net.org/audio/?<b>loc</b>=http://wherever.the/mp3/file.is&<b>Play</b>=yes</i>"><br>Click Here to listen to that one song!</a>
</font>
</form>
</td>
</tr>
<tr>
<td width="100%" height="2%" valign="top">
<p align="center"><b><font face="Verdana,Arial" size="3" color="#808080">Powered
by <a href="http://www.de-net.org"> The DE-Network</a> | Tool by <a href="http://www.de-net.org/bios?digital"> Digital</a></font></b>
</td>
</tr>
</table>
</div>
</body>
</html>
<?
}
else
{
if (!$loc)
{
echo "There's no audio file specified...";
die;
}
$loc = str_replace(" ", "%20",$loc);
Header("Content-Type: audio/x-mpegurl");
echo $loc . "\n"; }
?> |