Members: 16,996
Threads: 38,845
Posts: 159,389
Online: 17

Newest Member: Kl_broka@rediffmail.com


Odoo.tv - Outdoor Television


Sedo - Domains kaufen und verkaufen das Projekt mambers.com steht zum Verkauf Besucherstatistiken von mambers.com etracker® Web-Controlling statt Logfile-Analyse
Old 11.05.2004, 20:20   #1 (permalink)
Baby Mamber
 
Join Date: May 2004
Posts: 24
b-side is on a distinguished road
Default Shoutcast Stats mod

I am going to see if I can do this myself but I am not a coder and always seem to generate more errors than results. I thought I would see if someone would know of a way to have my shoutcast stats appear in the menu to let my visitors see what is playing and how many are connected. I am trying to use other PHP scripts I found that are supposed to parse Shoutcast's XML but none are woking for me so far.

Last edited by b-side; 12.05.2004 at 20:06.
b-side is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
Old 12.05.2004, 19:59   #2 (permalink)
Baby Mamber
 
Join Date: May 2004
Posts: 24
b-side is on a distinguished road
Default Re: Req for Shoutcast Stats mod

Success! I have even made it into a mod but waiting for author's permission before releasing it. Anyone see anything wrong with this code for use inside Mambo. I am not a coder so I can't see any potention issues. Any advice would be appreciated!

<?php
// Shoutcast Server Stats
// Parses shoutcasts xml to make an effective stats thing for any website
// hardcore coded by daniel brown aka xbrowniex ©www.gmtt.co.uk 2003.
defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
include('modules\config_shoutcast.php'); //you may edit this path to fit your server environment otherwise leave it alone
$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.0\r\nUser-Agent: SHOUTcast Song Status (Mozilla Compatible)\r\n\r\n");
while(!feof($scfp)) {
$page .= fgets($scfp, 1000);
}
################################################## ################################################## ##################
/////////////////////////part 1 \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
//define xml elements
$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++;
}
//end intro xml elements
################################################## ################################################## ##################
################################################## ################################################## ##################
/////////////////////////part 2\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
//get song info and history
$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++;
}
//end song info

fclose($scfp);
}

//display stats
if($streamstatus == "1"){
//you may edit the html below, make sure to keep variable intact
echo'
<p><b>Listeners:</b> '.$currentlisteners.' / 4</p>
<p><b>Current Song:<BR>
</b> '.$song[0].'</p>
<p><b>Past Songs:</b><BR>
<b></b> '.$song[1].'<BR>
<b></b> '.$song[2].'<BR>
<b></b> '.$song[3].'<BR>
<b></b> '.$song[4].'<BR>
<b></b> '.$song[5].'</p>
<p><a href="Playlist URL HERE" target="_blank"><strong>Tune In!</strong></a></p>';
}
?>
b-side is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 26.06.2004, 21:16   #3 (permalink)
Junior Mamber
 
sh33zo's Avatar
 
Join Date: Apr 2004
Location: 514
Posts: 42
sh33zo is on a distinguished road
Send a message via MSN to sh33zo
Default Re: Req for Shoutcast Stats mod

Could you guys post an url with this module working?
I would like to see what it does.

I have use this simple php script that I found on this forum.
http://www.kription.com/forums/viewforum.php?forum=1
simple.php
I've been using it since ladt year and it's working great!
checkit out!
http://sh33zo.net

Please post some demo site for this module.
Thankz
__________________
I beat the hell out of windoze!! and NOW
Linux I will beat u 2!!!!
http://musakk.net
sh33zo is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 30.09.2004, 14:12   #4 (permalink)
Baby Mamber
 
Join Date: Apr 2004
Posts: 16
tchilly is on a distinguished road
Default Re: Req for Shoutcast Stats mod

anyone got a working shoutcast module for 4.5.1 ? Need it bad... plz post a link or sumething...
tchilly is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01.10.2004, 01:50   #5 (permalink)
Mamber
 
Join Date: Aug 2004
Posts: 67
drue is on a distinguished road
Default Re: Req for Shoutcast Stats mod

Working on one from scratch (not relying on others code, so there's no need for permissions). I'm also hoping to make it cleaner, more customizable, and be able to display album covers if the song playing is not indie and thus has one available.

It'll probably take me a couple days as I'm going to use the new DOMIT Lite XML to process the information from shoutcast and I'm not really familiar with the setup. If you have any feature requests, let me know.
drue is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01.10.2004, 16:09   #6 (permalink)
Baby Mamber
 
Join Date: Apr 2004
Posts: 16
tchilly is on a distinguished road
Default Re: Req for Shoutcast Stats mod

just the usual.

online/offline
song playing right now..
10 last songs
and a tune in button..
tchilly is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 31.01.2005, 02:09   #7 (permalink)
mbi
Senior Mamber
 
mbi's Avatar
 
Join Date: Jul 2004
Location: Hannover
Posts: 178
mbi is on a distinguished road
Default Re: Req for Shoutcast Stats mod

http://www.mambowizard.com/showthread.php?t=79
__________________
Marko Bischof
http://www.mambowizard.com
mbi is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 18.04.2005, 20:00   #8 (permalink)
Baby Mamber
 
Everlast's Avatar
 
Join Date: Nov 2004
Location: RW
Posts: 16
Everlast is on a distinguished road
Send a message via ICQ to Everlast
Default Re: Req for Shoutcast Stats mod

hi there,

you can find a simple shoutcast module (nnShoutCast) working with mambo 4.5.x on www.naanuu.net

Enjoy it!

Greetz Everlast
__________________
Joomla! IRC Channel: http://forum.opensourcematters.org/i...ic,3159.0.html
server: irc.euirc.net:6667
channel: #Joomla!
Everlast is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools
Display Modes

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
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
reset site stats literati Mambo 4.5 'How Do I' Questions 2 14.04.2004 01:12


All times are GMT +2. The time now is 08:37.

Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.1.0
A vBSkinworks Design
© Copyright 2004-2008 by Arthur Konze Webdesign.