SHOUTcast is a free-of-charge audio homesteading solution. It permits anyone
on the internet to broadcast audio from their PC to listeners across the
Internet or any other IP-based network (Office LANs, college campuses, etc.).
================================================== =====
Tested On:
vBulletin 4+
SHOUTcast Server v1.9.5
================================================== =====
== Install: 2-5 min ==
Full Stats
- Needs Shoutcast server admin password
Server Name
Last 19 songs
4 media layers (winamp, quicktime, media player, real player)
DJ Name
Bitrate
Current Song
Media Type
Most Ever Connected
Hit Count
Users Connected
Avj. Connect Time
User Max
Online / Offline status
XML Data Cache
Lite Stats
- Dose not need shoutcast server admin password
Server Name
4 media players (winamp, quicktime, media player, real player)
Bitrate
Current Song
Users Connected
User Max
Online / Offline status
// Check if Cache File needs updated or not if (!is_writable($file)) { @ chmod($folderstring, 0777); } // Check if Cache needs an update if (file_exists($file)) { clearstatcache(); // filemtime info gets cached so we must ensure that the cache is empty $time_difference = time() - filemtime($file); // echo "$file was last modified: " . date ("F d Y H:i:s.", filemtime($file)) . "( " . $time_difference . " seconds ago) <br>" . "The cache is set to update every " . $cache_tolerance . " seconds.<br>"; } else { $time_difference = $cache_tolerance; // force update }
// Parses shoutcasts xml to make an effective stats thing for any website $scfp = @ fsockopen($scip, $scport, $errno, $errstr, 2);
// If server is off line if (!$scfp) { if ($scoff == 1) {
echo" <html>
<head> <title>$scdef</title> </head>
<body >
<table width=100%> <tr> <td> <img border=0 src=$pfad/shoutcast_off.gif alt=''> <br><b>$scdef ist derzeit leider</b></br> <img src= $pfad/offline.gif /> </td> <tr><td colspan=2>Sorry, but at moment the radio is offline. </td></tr> </tr> </table> </body> </html> "; } } else {
// ############ Shoutcast server is online #######################
if ($time_difference >= $cache_tolerance) { // update the cache if need be // Get XML feed from server if ($scsuccs != 1) { if ($scpass) { fputs($scfp, "GET /admin.cgi?pass=$scpass&mode=viewxml HTTP/1.0\r\nUser-Agent: SHOUTcast Song Status (Mozilla Compatible)\r\n\r\n"); } else { fputs($scfp, "GET /7.html HTTP/1.0\r\nUser-Agent: XML Getter (Mozilla Compatible)\r\n\r\n"); } while (!feof($scfp)) { $xmlfeed .= fgets($scfp, 8192); } fclose($scfp); } // Output to cache file $tmpfile = fopen($file, "w+"); $fp = fwrite($tmpfile, $xmlfeed); fclose($tmpfile); flush(); // Outputs the cached file after new data $xmlcache = fopen($file, "r"); $page = ''; if ($xmlcache) { while (!feof($xmlcache)) { $page .= fread($xmlcache, 8192); } fclose($xmlcache); } } else { // outputs the cached file $xmlcache = fopen($file, "r"); $page = ''; if ($xmlcache) { while (!feof($xmlcache)) { $page .= fread($xmlcache, 8192); } fclose($xmlcache); } } } if ($scpass) { // ######### There is a Admin password ###############
<table width=100%> <tr> <td> <img border=0 src=$pfad/shoutcast_off.gif alt=''> <br><b>$scdef ist derzeit leider</b></br> <img src= $pfad/offline.gif /> </td> <tr><td colspan=2>Sorry, but at moment the radio is offline</td></tr> </tr> </table> </body> </html>"; }
}
//} ?>
feel free in use and modify how u like...
Thanks!
So using a combination of yours and Zachariah's code I pieced together a vba module won't release the code tho since its both of ya'll's, as well as it needs to be cleaned up and properly setup. See site link in sig.
Waiting on an update for this mod tho and hoping an official vba module is released!