vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Shoutcast Status Lite (https://vborg.vbsupport.ru/showthread.php?t=76920)

Zachariah 07-13-2006 01:58 AM

Quote:

Originally Posted by JourneyDeep
not to sound stupid, but I came across this section in the install notes and I'm stuck...

Make Template: |
===============
forumhome_shoutcast

I was able to edit the forumhome template, but have no clue howto make a template. This is what I ended up with... i think the link was add style, not add template?

https://vborg.vbsupport.ru/external/2006/07/19.jpg

v3.5.4


Add New Template - is in the dropdown of each style in the style manager.

Journey Deep Lava Forums => there is a Dropdown on that style
- Add New Template

dstjohn 07-21-2006 11:02 PM

Here is an update for you if your having issues with the http auth,
i had to update my scsong for this at casterclub.com
scsong.php
PHP Code:

<?php
/*
// Author: dstjohn (Mediacast1/Casterclub)
// Date started: 05-03-2002 (10:00A.M)
// Date Ended: 05-03-2002 (6:03 P.M)
// Requirements:
// 1.SHOUTcast streaming server
// 2.Oddcast dsp with winamp/xmms (recomended setup)
// 3.Webserver with php 4.x (Recommended environment: Unix (Freebsd, Red Hat etc.. with Apache 3.x)
// Support: None, post in the casterclub forums
// Core script Information:
// SHOUTcast Song Status was written and developed on Windows Xp with apache and php4.1.2
// Has not been tested on IIs webservers, if you do so and get it to work please let us know
// At the forums (http://casterclub.com/forums)
// Also has been tested on freebsd with apache, php4.1.2 and works fine.
*/
//connect to shoutcast server
include('./config.php');  //you may edit this path to fit your server environment otherwise leave it alone
$scfp fsockopen("$scip"$scport, &$errno, &$errstr30);
 if(!
$scfp) {
  
$scsuccs=1;
echo
''.$scdef.' is Offline';
 }
if(
$scsuccs!=1){

  
//for newer shoutcast servers
fputs ($scfp"GET /admin.cgi?mode=viewxml HTTP/1.1\r\nHost: $scip:$scport\r\n .
User-Agent: SHOUTcast Song (author: dstjohn@mediacast1.com)(Mozilla Compatible)\r\n .
Authorization: Basic "
.base64_encode ("admin:$scpass")."\r\n\r\n");
 while(!
feof($scfp)) {
  
$page .= fgets($scfp1000);
 }

//define  xml elements
 
$loop = array("STREAMSTATUS""BITRATE");
 
$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)
   $
$scphp urldecode($$scphp);

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

//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]);


//format the date
$frmt_date[$t] = date('l dS of F Y h:i:s A',$playedat[$t]);
    
//you may edit the html below, make sure to keep variables intact
echo'
<b>'
.$t.'.</b>Song:  '.$song[$t].' - <b>Played @</b> '.$frmt_date[$t].'<BR>
'
;


        
$r++;
    }

fclose($scfp);
}
?>

config.php
PHP Code:

<?php
/*
// Author: dstjohn (Mediacast1/Casterclub)
// Date started: 05-03-2002 (10:00A.M)
// Date Ended: 05-03-2002 (6:03 P.M)
// Requirements:
// 1.SHOUTcast streaming server
// 2.Oddcast dsp with winamp/xmms (recomended setup)
// 3.Webserver with php 4.x (Recommended environment: Unix (Freebsd, Red Hat etc.. with Apache 3.x)
// Support: None, post in the casterclub forums
// Core script Information:
// SHOUTcast Song Status was written and developed on Windows Xp with apache and php4.1.2
// Has not been tested on IIs webservers, if you do so and get it to work please let us know
// At the forums (http://casterclub.com/forums)
// Also has been tested on freebsd with apache, php4.1.2 and works fine.
*/
//Configuration
$scdef "rogerdat";               // Default station name to display when server or stream is down
$scip "127.0.0.1"// ip or url of shoutcast server
$scport "89000";                   // port of shoutcast server
$scpass "goodstuff";                 // password to shoutcast server
//End configuration

?>

Just some tidbits for you to incorperate into your scastlite
as this formats the date/time songs are played
and addresses base64_encode.

MrPHD 07-23-2006 02:34 PM

I can“t put this hack work.

ceedee 09-12-2006 01:41 PM

Sweet, thanks!

*Clicks install* :)

Paultiscali 02-06-2007 11:15 PM

I was just wondering

can this modification be installed on a vbulletin version 3.6 ??

Zachariah 02-06-2007 11:34 PM

Quote:

Originally Posted by Paultiscali (Post 1176434)
I was just wondering

can this modification be installed on a vbulletin version 3.6 ??

It was renamed and repacked.

Shoutcast Status 2.0 (VB3.6)

Paultiscali 02-07-2007 12:06 PM

Its only because i tried to install this on my forum and i got a error on my index.php page

I would like the latest shoutcast status lite only to work on vb 3.6

Zachariah 02-07-2007 09:28 PM

Quote:

Originally Posted by Paultiscali (Post 1176744)
Its only because i tried to install this on my forum and i got a error on my index.php page

I would like the latest shoutcast status lite only to work on vb 3.6

I understand the link above is what you need.
It is Shoutcast Lite and Full in 1 package.

If you have no DJ/Admin password its "Lite".

Paultiscali 02-08-2007 10:50 AM

I have installed the latest mod for my forum but no look as my ip is shoutcast2.tidyhosts.com and my ip is 9088 but when my radio is on and i go to my forum the server says its offline which it isnt

I have put in my correct dj/admin password which is correct and no luck

iMystik 02-20-2007 10:33 PM

i unistalled this but i still see

forumhome_shoutcast_qt

and other templates how do i remove em?

Zachariah 02-20-2007 11:25 PM

Quote:

Originally Posted by Paultiscali (Post 1177454)
I have installed the latest mod for my forum but no look as my ip is shoutcast2.tidyhosts.com and my ip is 9088 but when my radio is on and i go to my forum the server says its offline which it isnt

I have put in my correct dj/admin password which is correct and no luck

Try:
IP: 194.150.121.47
Port: 9088

Quote:

Originally Posted by iMystik (Post 1187061)
i unistalled this but i still see

forumhome_shoutcast_qt

and other templates how do i remove em?

If the templates have not removed you can select the template and "revert" it.

AdminCP -> Styles & Templates -> Style Manager -> Edit Templates -> Select a template you wish to remove => Click the 'Revert' button

gullystation 02-28-2007 07:19 PM

same happens here i put the correct information in and it jsut says the radio station is offline.

and wot does it mean wen it says Please enter in the Update time of your shoutcast station.
Note: seconds untill cache update

wt do i have to put in dere.

thanx ure hlep will be appreciated

TRa5H 05-27-2008 08:55 AM

Ok so i am having issues .. i cannot get the shoutcast to work.. i have tried with like 15 different shoutcast ips.. so i know its not that.. below is what i currently have.. i am using shoutcast lite and the cmps shoutcast lite for other pages..

Code:

$scdef = "[XRM] - Alternative";  // Default station name
$scip = "66.207.166.59";  // ip shoutcast server
$scport = "8000";        // port of shoutcast server

and here is my forums.. www.rebelsofchaos.net there is a navigation menu top right kinda hidden takes you to all pages..

all that shows is the shoutcast is currently offline.. please help! thanks

Zachariah 05-27-2008 11:57 AM

Quote:

Originally Posted by TRa5H (Post 1532694)
Ok so i am having issues .. i cannot get the shoutcast to work.. i have tried with like 15 different shoutcast ips.. so i know its not that.. below is what i currently have.. i am using shoutcast lite and the cmps shoutcast lite for other pages..

Code:

$scdef = "[XRM] - Alternative";  // Default station name
$scip = "66.207.166.59";  // ip shoutcast server
$scport = "8000";        // port of shoutcast server

and here is my forums.. www.rebelsofchaos.net there is a navigation menu top right kinda hidden takes you to all pages..

all that shows is the shoutcast is currently offline.. please help! thanks

9 out of 10 times this is because of settings (port,ip,password) or your webhost has blocked ports. Many hosts only allow queries for data on port 80 (http, rss, xml feeds). I have seen many webhosts designate a port for "other" needs of their clients.

TRa5H 05-27-2008 07:18 PM

well I spoke with them and they said all their ports run off of 80 so i dont know what to say .. but it isnt just the ports i am using.. i went through like 20 diffrent Ip servers and stations and well i havent had a single one work yet.. Below is the full php that i have so if i am wrong with anything please let me know...

Code:

<?php
/* -----------------2/22/2005 6:23pm-----------------
Shoutcast Status Lite 1.0

This is a Nice hack to add Shoutcast Status on your VB3.x Forum Home.
Hope it helps !!!  Zack @ http://www.gzhq.net

(this hack does not need a password to pull stream information.)
CREDITS:
GeZuS P  - for giving me a leg up on some code.
-------------------------------------------------------*/
//Configuration

$scdef = "idobi Radio";  // Default station name
$scip = "208.53.158.213";  // ip shoutcast server
$scport = "80";        // port of shoutcast server

//End configuration

// Shoutcast Server Stats
// Parses shoutcasts xml to make an effective stats thing for any website
$scfp = @fsockopen($scip, $scport, &$errno, &$errstr, 1);

if(!$scfp) {
eval('$scast = "' . fetch_template('forumhome_shoutcast_off') . '";');

}else{
if($scsuccs!=1){
fputs($scfp,"GET /7.html HTTP/1.0\r\nUser-Agent: XML Getter (Mozilla Compatible)\r\n\r\n");
while(!feof($scfp)) {
  $page .= fgets($scfp, 1000);
}
}

//define all the variables to get (delte any ones you don't want)
 $page = ereg_replace(".*<body>", "", $page); //extract data
 $page = ereg_replace("</body>.*", ",", $page); //extract data
 $numbers = explode(",",$page);  //extract data
 $currentlisteners=$numbers[0];
 $streamstatus=$numbers[1];
 $peaklisteners=$numbers[2];
 $maxlisteners=$numbers[3];
 $currentlisteners=$numbers[4];
 $bitrate=$numbers[5];
 $song[0]=$numbers[6];
}

//end song info
if($scfp) {
fclose($scfp);
}
$listenlink = 'http://'.$scip.':'.$scport.'/listen.pls';  //make link to stream

//display stats
if($scfp) {
if($streamstatus == "1"){
eval('$scast = "' . fetch_template('forumhome_shoutcast') . '";');
} else {
eval('$scast = "' . fetch_template('forumhome_shoutcast_off') . '";');
}
}
?>

thanks again

i mean you can see on my site under forums that it stays turned off

www.rebelsofchaos.net

citroenar 06-09-2008 07:10 PM

Try here if ports are open,if not you have to contact host to open port8000 for you.

http://www.canyouseeme.org/

theque 07-15-2008 08:50 AM

Hi does anyone no how to grab the $servertitle = this will display the information the current live dj is playing :ie on his shoutcast description this is the only info i need to grab

theque 07-19-2008 09:56 AM

hi ill explaing a bit more what i want to achive this is part of the code

//define all the variables to get (delte any ones you don't want)
$page = ereg_replace(".*<body>", "", $page); //extract data
$page = ereg_replace("</body>.*", ",", $page); //extract data
$numbers = explode(",",$page); //extract data
$currentlisteners=$numbers[0];
$streamstatus=$numbers[1];
$peaklisteners=$numbers[2];
$maxlisteners=$numbers[3];
$currentlisteners=$numbers[4];
$bitrate=$numbers[5];
$song[0]=$numbers[6];
}

//end song info

i want to add $servertitle to this or maybe $description i belive this can be done without the admin password -

any ideas please ive tried everyting i can but am no expert on this.

cheers


All times are GMT. The time now is 01:15 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01189 seconds
  • Memory Usage 1,828KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_code_printable
  • (2)bbcode_php_printable
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (18)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete