Bravo List
Register
Go Back   > Bravo List > Source Code > Archived Trackers > Torrent Trader > Mods & Themes
Reply
  #1  
Old 3rd September 2008, 03:28
Grom's Avatar
Grom Grom is offline
Senior Member
 
Join Date: Aug 2008
Posts: 73
Smile Shoutcast Radio
This is not all my work!

radio.php
PHP Code:
<?
error_reporting(0);
require_once("backend/functions.php");
dbconn();
if ($LOGGEDINONLY){
if (!$CURUSER){
echo "<BR><b><CENTER>You Are Not Logged In<br>Only Members Can Listen to MGA Radio Please Signup.</CENTER><BR><BR>";
}else{
echo '
<html>

<head>
<meta http-equiv="Content-Language" content="en-gb">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>MGA Radio</title>
</head>

<body topmargin="0" leftmargin="0" background="images/soundbg.jpg" link="#FFFF00" vlink="#FFFF00" alink="#FFFF00" text="#FFFFFF" bgcolor="#000000">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="350" height="100">
  <tr>
    <td width="100%" valign="top">
   <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%">
      <tr>
        <td width="100%">
        <p align="center"><font face="Arial"><b>MGA TV Torrents Radio</b></font></td>
      </tr>
    </table>
    <hr>
   <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%">
      <tr>
        <td width="50%">
        <p align="center"><b><font face="Arial" size="1">
        <a href="radio/radioplayer.php?lang=&z=wmp">Play Using Windows Media 
        Player</a></font></b></td>
        <td width="50%">
        <p align="center"><b><font face="Arial" size="1">
       <a href="radio/radioplayer.php?lang=&z=real">Play Using Real Player</a></font></b></td>
      </tr>
    </table>
    <hr>
   <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%">
      <tr>
        <td width="100%"><font face="Arial" size="1">Windows 
        Media Player 10 or above is needed to play shoutcast streams</font></td>
      </tr>
    </table>
   <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%">
      <tr>
        <td width="100%">
        <p align="center"><font size="1" face="Arial">Powered by MGA Radio, 
        Winamp &amp; Shoutcast</font></td>
      </tr>
    </table>
    </td>
  </tr>
</table>

</body>

</html>';
}
}
?>
myradio.php


PHP Code:
<?
error_reporting(0);
require_once("backend/functions.php");
dbconn(false);
$showradioinfo="page";
include("radio-info.php");
stdhead();
begin_frame("MGA Radio");
?>
<p align="center"><b><br>
<br>
<a href="JavaScript:radio_player()">Click here to tune in and listen now.</a></b></p>
<div align="center">
  <center>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%">
  <tr>
    <td width="50%">
    <div align="center">
      <center>
      <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111">
        <tr>
          <td width="50%" align="center"><a href="JavaScript:radio_player()">
          <img border="0" src="images/win.gif" width="64" height="64"></a></td>
          <td width="50%" align="center"><a href="JavaScript:radio_player()">
          <img border="0" src="images/real.gif" width="80" height="70"></a></td>
        </tr>
        <tr>
          <td width="50%" align="center">
          <img border="0" src="images/shoutcast.gif" width="160" height="44"></td>
          <td width="50%" align="center">
          <img border="0" src="images/winamp.gif" width="75" height="76"></td>
        </tr>
      </table>
      </center>
    </div>
    </td>
    <td width="50%">
    <table border="0" cellpadding="2" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111">
    <tr>
      <td align="left"><b>Status :</b> </td>
      <td><img border="0" src="<? echo $radioimg; ?>"></td>
    </tr>
    <tr>
      <td align="left"><b>Currently Playing :&nbsp; </b></td>
      <td><? echo $song[0]; ?></td>
    </tr>
    <tr>
      <td align="left"><b>Members Listening Now :&nbsp; </b></td>
      <td><? echo $currentlisteners; ?></td>
    </tr>
    <tr>
      <td align="left" valign="top"><b>Last 5 Tracks Played..&nbsp; </b></td>
     <td><? echo $song[1]."<BR>"; ?><? echo $song[2]."<BR>"; ?><? echo $song[3]."<BR>"; ?><? echo $song[4]."<BR>"; ?><? echo $song[5]."<BR>"; ?></td>
    </tr>
  </table>
    <p>&nbsp;</td>
  </tr>
</table>
  </center>
</div>
<p>&nbsp;</p>
<div align="center">
  <center>
  
  <p></p>
  
  </center>
</div>

<p align="center">You will need Windows Media Player 10+ or Real Player to to 
listen to the radio stream! </p>
<p align="center">Radio Powered by Shoutcast &amp; Winamp</p>


<?
end_frame();
stdfoot();
?>
radio-info.php

PHP Code:
<?
error_reporting(0);
require_once("backend/functions.php");
dbconn(false);
?>
<script language="JavaScript">
<!--
function radio_player() {
props=window.open('radio.php', 'poppage', 'toolbars=0, scrollbars=0, location=0, statusbars=0, menubars=0, resizable=0, width=350, height=100 left = 100, top = 100');
}
-->
</script>
<?
error_reporting(0);
error_reporting(0);
require_once("backend/functions.php");
dbconn(false);
$scdef = "NAME OF YOUR RADIO"; 
$scip = "HOST OF YOUR RADIO"; // IP OR DOMAIN
$scport = "8000"; // PORT
$scpass = "PASSWORD FOR SHOUTCAST SERVER"; 


$bgcolor = "#000000"; 



$scfp = fsockopen("$scip", $scport, &$errno, &$errstr, 30);
if(!$scfp) {
$scsuccs=1;
echo''.$scdef.' is Offline';
}
if($scsuccs!=1){
fputs($scfp,"GET /admin.cgi?pass=$scpass&mode=viewxml HTTP/1.1\r\nUser-Agent: SHOUTcast Song Status (Mozilla Compatible)\r\n\r\n");
while(!feof($scfp)) {
$page .= fgets($scfp, 1000);
}




$loop = array("STREAMSTATUS", "BITRATE", "SERVERTITLE", "CURRENTLISTENERS");
$y=0;
while($loop[$y]!=''){
$pageed = ereg_replace(".*<$loop[$y]>", "", $page);
$scphp = strtolower($loop[$y]);
$$scphp = ereg_replace("</$loop[$y]>.*", "", $pageed);
if($loop[$y]==SERVERGENRE || $loop[$y]==SERVERTITLE || $loop[$y]==SONGTITLE || $loop[$y]==SERVERTITLE)
$$scphp = urldecode($$scphp);

// uncomment the next line to see all variables
//echo'$'.$scphp.' = '.$$scphp.'<br>';
$y++;
}

$pageed = ereg_replace(".*<SONGHISTORY>", "", $page);
$pageed = ereg_replace("<SONGHISTORY>.*", "", $pageed);
$songatime = explode("<SONG>", $pageed);
$r=1;
while($songatime[$r]!=""){
$t=$r-1;
$playedat[$t] = ereg_replace(".*<PLAYEDAT>", "", $songatime[$r]);
$playedat[$t] = ereg_replace("</PLAYEDAT>.*", "", $playedat[$t]);
$song[$t] = ereg_replace(".*<TITLE>", "", $songatime[$r]);
$song[$t] = ereg_replace("</TITLE>.*", "", $song[$t]);
$song[$t] = urldecode($song[$t]);
$dj[$t] = ereg_replace(".*<SERVERTITLE>", "", $page);
$dj[$t] = ereg_replace("</SERVERTITLE>.*", "", $pageed);
$r++;
}

fclose($scfp);
}
if ($showradioinfo=="on"){
if ($streamstatus == "1"){
$rstatus = "Playing";}
else { $rstatus = "Stopped";}

echo "<hr>Radio Status : ".$rstatus."<br>";
echo "Current Listeners ".$currentlisteners."<br>";
echo "Listening to......<br> ".$song[0];
echo "<br><a href='myradio.php'>Listen Now</a>";}

if ($showradioinfo=="page") {
if ($streamstatus == "1"){
$radioimg = "images/radioonline.jpg";}
else{
$radioimg = "images/radiooffline.jpg";}}

?>
if you want to have the radio stats in the left nav menu
in header.php under the donate block add this

PHP Code:
begin_block("MGA Radio Info");
$showradioinfo="on";
include(
"radio-info.php");
end_block(); 
upload all the images to your images folder
upload the radio folder to your trackers root (same place as index.php)
edit the config.php in the radio folder.
edit the radio-info.php
Attached Images
 
Attached Files
File Type: rar radio.rar (41.9 KB, 348 views)
File Type: rar radio_images.rar (24.0 KB, 291 views)
Reply With Quote
The Following 2 Users Say Thank You to Grom For This Useful Post:
demon2011 (28th March 2013), romano1 (6th January 2013)
  #2  
Old 13th September 2010, 21:29
Egidijuss's Avatar
Egidijuss Egidijuss is offline
Member
 
Join Date: May 2010
Lithuania
Posts: 6
Default Help
radio-info.php on line 27

PHP Code:
$scfp fsockopen("$scip"$scport, &$errno, &$errstr30); 
Reply With Quote
  #3  
Old 13th September 2010, 22:04
daffy's Avatar
daffy daffy is offline
Stoned Staff
 
Join Date: Mar 2009
United Kingdom
Posts: 549
Default
replace with attached, edit with server info.
Attached Files
File Type: php radio-info.php (2.3 KB, 106 views)
__________________
"FFS PPL READ GOD DAMMIT, WHAT AM I GOOGLE?"
"I Kill You!" simples


http://i.imgur.com/DtcRfH5.gif

I also Setup And Modify Trackers PM For Details
Reply With Quote
  #4  
Old 19th September 2010, 09:38
Egidijuss's Avatar
Egidijuss Egidijuss is offline
Member
 
Join Date: May 2010
Lithuania
Posts: 6
Default
Quote:
Originally Posted by daffy View Post
replace with attached, edit with server info.


Code:
Warning: Call-time pass-by-reference has been deprecated in ............ ....... radio-info.php on line 25

$scfp = fsockopen("$scip", $scport, &$errno, &$errstr, 01);
 
HELP PLEASE
:unknown:
Reply With Quote
  #5  
Old 19th September 2010, 15:19
kickass's Avatar
kickass kickass is offline
Member
 
Join Date: Mar 2008
United Kingdom
Posts: 9
Default
You can set allow_call_time_pass_reference to true in your INI file
Reply With Quote
  #6  
Old 6th January 2011, 00:52
smudger's Avatar
smudger smudger is offline
Member
 
Join Date: Jun 2008
Posts: 10
Default
Quote:
begin_block("MGA Radio Info");
$showradioinfo="on";
include(
"radio-info.php");
end_block();


i dnt see were to put this in header tt v2
Reply With Quote
  #7  
Old 6th January 2011, 02:03
daffy's Avatar
daffy daffy is offline
Stoned Staff
 
Join Date: Mar 2009
United Kingdom
Posts: 549
Default
place the code where you want it to show, i would put this into index.php and not header.php unless you want this to show on ALL pages ( i would not advice that tho), personally i would put this into index.php

strange as i recall writing most of this on TT some 4 years ago.

Code:
open index.php

to show in index copy below 

$showradioinfo="on";
include("myradio.php");

before

stdfoot();
?>


upload all the images to your images folder
upload the radio folder to your trackers root
upload all php files to root
upload shoutcast_block to blocks
edit radio/config.php
edit radio-info.php
Also attached is another radio "Radio_mod" which was written/coded by FOZ so all credit goes to him, i cannot remember what this looks like but i know this works.
Attached Files
File Type: rar my radio.rar (131.8 KB, 147 views)
File Type: rar Radio_mod.rar (97.6 KB, 117 views)
__________________
"FFS PPL READ GOD DAMMIT, WHAT AM I GOOGLE?"
"I Kill You!" simples


http://i.imgur.com/DtcRfH5.gif

I also Setup And Modify Trackers PM For Details
Reply With Quote
  #8  
Old 6th January 2011, 12:35
smudger's Avatar
smudger smudger is offline
Member
 
Join Date: Jun 2008
Posts: 10
Default
after looking into the code in more detail duhhh I had to create a new block.php then add a new block details in phpmyadmin for it to work now it shows in a block
Reply With Quote
  #9  
Old 30th December 2012, 03:02
ivo's Avatar
ivo ivo is offline
Member
 
Join Date: Jul 2012
Croatia
Posts: 14
Unhappy block
How to create a block on the index page for the radio, please help me never fails
TBDev 2010
Reply With Quote
  #10  
Old 22nd August 2019, 10:47
Napon's Avatar
Napon Napon is offline
Banned
 
Join Date: Feb 2016
P2P
Posts: 522
Default
$scfp = fsockopen("$scip", $scport, $errno, $errstr, 01);

Bump: This is also out of date radio
Reply With Quote
Reply

Tags
radio , shoutcast

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Game mod plugins - Shoutcast mod for FTS yoligim Free Torrent Source 1 21st December 2009 02:37
Yuna Pre6 ShoutCast evaldas40 Yuna Scatari Edition (YSE) 0 27th August 2009 14:18
Shoutcast Mod Action Template Shares 0 27th July 2009 14:11
Shoutcast Plugin trilious Template Shares 0 9th August 2008 21:37



All times are GMT +2. The time now is 16:48. vBulletin skin by ForumMonkeys. Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2021, vBulletin Solutions Inc.