Warning: set_time_limit(): Cannot set time limit in safe mode in /home/www/dynamic/uv.ro/pubory.uv.ro/public_html/pub/index.php on line 526 includes/common.php0000755000000000000000000000733112144677001011564 0ustar 80) ? ':' . trim($server_port) : ''; } // // Get the current document root. // like /wamp/www/ if( isset($_SERVER['DOCUMENT_ROOT']) ) { $document_root = $_SERVER['DOCUMENT_ROOT']; } elseif( isset($DOCUMENT_ROOT) ) { $document_root = $DOCUMENT_ROOT; } else { $document_root = './'; } //Remove drive leter in windows $document_root = substr(strrchr($document_root, ':'), 1); $document_root = str_replace('\\', '/', $document_root); // Get the lasr path to this installation. like /wamp/www/ $document_bang = explode('/', $document_root); $bangs = sizeof($document_bang) - 2; $document_bang = $document_bang[$bangs]; // Get the absolute path to this installation. like /wamp/www/pub/radioplayer/v4/ $mx_absolute_path = str_replace('\\', '/', substr(__FILE__, 0, -strlen('includes/'.basename(__FILE__)))); $script_path = substr(strrchr($mx_absolute_path, $document_bang), 1); $server_protocol = ($cookie_secure != false) ? 'https://' : 'http://'; $server_name = preg_replace('#^\/?(.*?)\/?$#', '\1', trim($server_name)); $script_name = preg_replace('#^\/?(.*?)\/?$#', '\1', trim($script_path)); $script_name = ($script_name == '') ? $script_name : '/' . $script_name; define('ADDON_URL', $server_protocol . $server_name . $server_port . $script_name . '/' );; // mx_shotcast version... $module_name = 'shotcast'; $is_block = false; } else { define('ADDON_URL', PORTAL_URL . $module_root_path); } if(isset($_GET["skin"])) { $radio_skin = $_GET["skin"]; } elseif(isset($_GET["style"])) { $radio_skin = $_GET["style"]; } else { if(empty($radio_skin)) { $radio_skin = "default"; } } if(isset($_GET["language"])) { $default_lang = $_GET["language"]; } elseif(isset($_GET["lang"])) { $default_lang = $_GET["lang"]; } else { if(empty($default_lang)) { $default_lang = "english"; } } // // Load language files. // // //Main module lang if ((@include $module_root_path . "language/lang_" . $default_lang . "/lang_main.$phpEx") === false) { if ((@include $module_root_path . "language/lang_english/lang_main.$phpEx") === false) { die('Language file ' . $module_root_path. "lang_" . $default_lang . "/lang_main.$phpEx" . ' couldn\'t be opened.'); } $default_lang = 'english'; } // // Common definitions... // @define('SKIN', $radio_skin); $time = date("U"); $cfg_shotcastname = $station_name . ' -> ' . 'shotcast'; $user_id = 1; $nick = 'Guest'; $radio_bot_id = -1; require($module_root_path . 'includes/getinfo.'.$phpEx); ?> includes/css.php0000755000000000000000000000677112144454524011076 0ustar "; return $header; } ?> includes/cur_display.php0000755000000000000000000000405011426665000012603 0ustar
BluePink BluePink
XHost
Oferim servicii de instalare, configurare si monitorizare servere linux (router, firewall, dns, web, email, baze de date, aplicatii, server de backup, domain controller, share de retea) de la 50 eur / instalare. Pentru detalii accesati site-ul BluePink.
' . $curentsong . ' * ' . $currentlisteners . ' ' . $lang['listeners'] . ' * Genre: ' . $stream_genre . ' * ' . $stream_title . ' *** '; ?> includes/cur_listeners.php0000755000000000000000000000344011426665000013150 0ustar ' . $currentlisteners . ''; ?> includes/cur_song.php0000755000000000000000000000342111426665000012105 0ustar '.$curentsong.''; ?> includes/detectScript.htm0000755000000000000000000003336612144300541012731 0ustar '; //print ''; print ""; ?>includes/getinfo.php0000755000000000000000000003375312143530452011733 0ustar = '5.0.0') { //$open = fsockopen($scip, $scport, &$errno, &$errstr, $connect_timeout); //open connection $open = @fsockopen($scip, $scport); //open connection if(!$open) { //if connection could not be made @fclose($open); $text = array(); if ($force_online == 1) { $text[1] = '1, 1, 4, 32, 1, 128, Unknon Artist'; $text = explode(",",$text[1]); } $er = '

' . $lang['Socket_functions_disabled'] . '

'; } else { //$request = "GET /7.html HTTP/1.1\r\nHost:" . $scip . ":" . $scport . "\r\nUser-Agent: SHOUTcast DNAS Status [7] * XML Getter (Mozilla Compatible)\r\nConnection: close\r\n\r\n"; //get 7.html //@fputs($open,"GET /7 HTTP/1.1\r\nUser-Agent:Mozilla\r\n\r\n"); fputs($open,"GET /7.html HTTP/1.1\r\nUser-Agent:Mozilla\r\n\r\n"); $read = @fread($open, 1000); $text = explode("content-type:text/html", $read); $text = explode(",",$text[1]); @fclose($open); } } else { $text = array(); $er = '

Old php version!

'; } $page = $song = ''; $scfp = @fsockopen($scip, $scport); $scsuccs = ($scfp) ? '' : 1; if ($scfp) { @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); } $loop = array("STREAMSTATUS", "BITRATE", "SERVERTITLE", "CURRENTLISTENERS", "MAXLISTENERS", "BITRATE", "SERVERGENRE", "SONGURL", "SERVERURL", "REPORTEDLISTENERS"); $y = 0; while(!empty($loop[$y])) { $pageed = @preg_replace("~.*<$loop[$y]>~", "", $page); $scphp = strtolower($loop[$y]); $$scphp = @preg_replace("~.*~", "", $pageed); if($loop[$y] == "STREAMSTATUS" || $loop[$y] == "BITRATE" || $loop[$y] == "SERVERTITLE" || $loop[$y] == "SERVERGENRE" || $loop[$y] == "CURRENTLISTENERS" || $loop[$y] == "MAXLISTENERS" || $loop[$y] == "SONGURL" || $loop[$y] == "SERVERURL" || $loop[$y] == "SONGTITLE" || $loop[$y] == "REPORTEDLISTENERS") { $$scphp = urldecode($$scphp); } $y++; } $pageed = @preg_replace("~.*~", "", $page); $pageed = @preg_replace("~.*~", "", $pageed); $songatime = explode("", $pageed); //$streamstatus = preg_replace("/.*/", "", $page); //$streamstatus = preg_replace("/.*/", "", $pageed); $r = 1; while(!empty($songatime[$r])) { $t = $r - 1; $playedat[$t] = preg_replace("/.*/", "", $songatime[$r]); $playedat[$t] = preg_replace("/.*/", "", $playedat[$t]); $song[$t] = preg_replace("/.*/", "", $songatime[$r]); $song[$t] = preg_replace("/.*/", "", $song[$t]); $song[$t] = urldecode($song[$t]); $dj[$t] = preg_replace("/.*/", "", $page); $dj[$t] = preg_replace("/.*/", "", $pageed); $r++; } @fclose($scfp); $text[1] = ($text[1] == 1) ? $text[1] : $streamstatus; //$text[2] = !empty($text[2]) ? $text[2] : $currentlisteners; $text[3] = !empty($text[3]) ? $text[3] : $maxlisteners; $text[5] = !empty($text[5]) ? $text[5] : $bitrate; } else { $shoutcastserver = $station = $servertitle = $station_name; $currentlisteners = "Unknon"; $bitrate = "Unknon"; $text[6] = $song[0] = "Unknon Artist"; $maxlisteners = "Unknon"; $servergenre = $lang['Socket_functions_disabled']; $songurl = "Unknon"; $serverurl = "Unknon"; $reportedlisteners = "Unknon"; $er = '

' . $lang['Socket_functions_disabled'] . '

'; } /** * radio.class is a stand-alone php class for ShoutCast Servers that obtains informations about the server. * USAGE: * $variable = new radio(HOST, PORT); - Construct the Object. ie. - new radio($SERVER_NAME, 8000); * $variable->host - Get server host. (INT) * $variable->port - Get server port. (INT) * $variable->stat - Status if server is on/off (INT, 1=on, 0=off) * $variable->bitrate - Bitrate of streaming audio. (INT) * $variable->listners - Listners. (INT) * $variable->station - Radiostation name (STRING) * $variable->genre - Streamers selected genre. (STRING) * $variable->song - Current song. (STRING) * $variable->played - Last played songs (ARRAY[STRING]) * * @author Niklas Pull * @created 2008-02-04, Sweden * * Keep the autor tag in order to use or distrubutate this php class, */ class radio { var $host; var $port; var $stat = 0; var $rawdata; var $c = 0; var $errno; var $errstr; /** * Constructor for radio class. * @param $host Server Host. * @param $port Server Port */ function radio($host, $port) { $this->host = $host; $this->port = $port; $this->rawdata = $this->getServerData("index.html"); $this->stat = $this->servStat(); } /** * Collecting raw data from ShoutCast server. * @param $source From where to collect data. * @return An array with each row. */ function getServerData($source) { $fp = @fsockopen($this->host, $this->port, $errno, $errstr, 10); static $buf; if (!$fp) { return; } else { @fputs($fp, "GET /$source HTTP/1.1\r\n"); @fputs($fp, "Host: $this->host\r\n"); @fputs($fp, "User-Agent: SHOUTcast Song Status (Mozilla Compatible)\r\n\r\n"); @fputs($fp, "Connection: close\r\n\r\n"); while (!feof($fp)) { $buf .= fgets($fp, 128); } @fclose($fp); return explode("\t", strip_tags(str_replace(array("", "", "Current Song"), array("\t", "\t", " Current Song"), $buf))); } } /** * @return An integer, 1 if the server is streaming otherwise 0. */ function servStat() { $i = 0; while ($i < count($this->rawdata)) { $this->rawdata[$i] = trim($this->rawdata[$i]); if (strstr($this->rawdata[$i], "Server Status:")) { $tmp = explode(" ", $this->rawdata[$i+1]); return ($tmp[3] == "up") ? "1" : "0"; } $i++; } return 0; } /** * @return An integer representing the bitrate of the streaming. */ function bitrate() { $i = 0; if($this->stat != 1) { return 0; } while ($i < count($this->rawdata)) { $this->rawdata[$i] = trim($this->rawdata[$i]); if (strstr($this->rawdata[$i], "Stream Status:")) { $bitr = explode(" ", $this->rawdata[$i+1]); return $bitr[4]; } $i++; } } /** * @return An integer of how many listners. */ function listners() { $i = 0; if($this->stat != 1) { return 0; } while ($i < count($this->rawdata)) { $this->rawdata[$i] = trim($this->rawdata[$i]); if (strstr($this->rawdata[$i], "Stream Status:")) { $listn = explode(" ", $this->rawdata[$i+1]); return $listn[7]; } $i++; } } /** * @return A string representing the Stream title. */ function station() { $i = 0; if($this->stat != 1) { return; } while ($i < count($this->rawdata)) { $this->rawdata[$i] = trim($this->rawdata[$i]); if (strstr($this->rawdata[$i], "Stream Title:")) { return $this->rawdata[$i+1]; } $i++; } } /** * @return The mime-type of the stream */ function mimeType() { $i = 0; if($this->stat != 1) { return; } while ($i < count($this->rawdata)) { $this->rawdata[$i] = trim($this->rawdata[$i]); if (strstr($this->rawdata[$i], "Content Type:")) { return $this->rawdata[$i+1]; } $i++; } } /** * @return The streaming genre. */ function genre() { $i = 0; if($this->stat != 1){ return; } while ($i < count($this->rawdata)) { $this->rawdata[$i] = trim($this->rawdata[$i]); if (strstr($this->rawdata[$i], "Stream Genre:")) { return $this->rawdata[$i+1]; } $i++; } } /** * @return A string with the current song playing on the stream. */ function song(){ $i = 0; if($this->stat != 1){ return; } if($this->c != 0){ return trim($this->rawdata[$this->c]); } while ($i < count($this->rawdata)) { $this->rawdata[$i] = trim($this->rawdata[$i]); if (strstr($this->rawdata[$i], "Current Song:")) { $this->c = $i+1; return $this->rawdata[$i+1]; } $i++; } } /** * @return An array with Strings of every previous played song, the lenght is set inte the .ini file for the ShoutCast server. */ function played() { $played = array(); $i = 0; if($this->stat != 1) { return; } $raw_played = $this->getServerData("played.html"); while ($i < count($raw_played)) { $raw_played[$i] = trim($raw_played[$i]); if (strstr($raw_played[$i], "Current Song")) { $i=$i+3; break; } $i++; } $j=0; while ($raw_played[$i-1] != "") { $played[$j] = $raw_played[$i]; $i=$i+2; $j++; } return $played; } } $radio = new radio($scip, $scport); $mimetype = ''; if ($radio->mimeType()) { $mimetype = $radio->mimeType(); } else { $mimetype = ($stream_type == 'mp3') ? 'audio/mpeg' : 'audio/aacp'; } // The "i" after the pattern delimiter indicates a case-insensitive search if (preg_match("/Unauthorized/", $servertitle)) { $servertitle = $station_name; } if($radio->station()) { $stream_title = $radio->station(); } else { $stream_title = $servertitle; } if (preg_match("/Unauthorized/", $servergenre)) { $servergenre = $radio->genre(); } if (preg_match("/Unauthorized/", $songurl)) { $songurl = ""; } if (preg_match("/Unauthorized/", $serverurl)) { $serverurl = $lang['require_password']; } //Check for reported listeners if (preg_match("/Unauthorized/", $reportedlisteners)) { $reportedlisteners = $lang['require_password']; } //Check for max listeners if (preg_match("/Unauthorized/", $maxlisteners)) { $maxlisteners = $text[3]; } //Check for curent listeners if($radio->listners()) { if (is_numeric($currentlisteners)) { if ($currentlisteners < $radio->listners()) { $currentlisteners = $radio->listners(); } //Else return value from admin.cgi //Validate admin.cgi $shotcast_admin = true; } else { $currentlisteners = $radio->listners(); $shotcast_admin = false; } //now compare $currentlisteners with value from 7.html if (is_numeric($text[2])) { if (($currentlisteners < $text[2])) { $currentlisteners = $text[2]; } //Validate 7.html $shotcast_stats = true; } if ((($shotcast_admin)&& ($shotcast_stats)) || (mt_rand(0, 3) === 1)) { $listeners_array = array(); $listeners_array[0] = $currentlisteners; $listeners_array[1] = $radio->listners(); $listeners_array[2] = $text[2]; $listeners_array[3] = $currentlisteners; $currentlisteners = $listeners_array[mt_rand(0, 3)]; } } elseif (@preg_match("/^[a-zA-Z\-\'\ ]+$/", $text[2])) { $currentlisteners = $text[2]; } elseif (@preg_match("/Unauthorized/", $currentlisteners)) { $currentlisteners = 'n/a'; } //Check for curent song if($radio->song()) { $curentsong = $radio->song(); } elseif (preg_match("/^[a-zA-Z\-\'\ ]+$/", $text[6])) { $curentsong = $text[6]; } elseif (($song[0]) || !(preg_match("/Unauthorized/", $song[0]))) { $curentsong = $song[0]; } else { $curentsong = $lang['Unknown_Artist']; } if($radio->genre()) { $stream_genre = $radio->genre(); } else { $stream_genre = $lang['Unknown']; } //Check for curent bitrate if($radio->bitrate()) { $bitrate = $radio->bitrate(); } elseif (preg_match("/^[a-zA-Z\-\'\ ]+$/", $text[5])) { $bitrate = $text[5]; } elseif (preg_match("/Unauthorized/", $bitrate)) { $bitrate = 'n/a'; } $wmpmode = ($mimetype !== 'audio/aacp') ? 'http://' : 'icyx://'; // AAC VS MPEG $wmplist = '/' . $playlist; $protocol_type = ($mimetype !== 'audio/aacp') ? 'http' : 'icyx'; $streamdest = $protocol_type . "://" . $scip . ":" . $scport . "/" . $playlist; $accplugin = 'http://www.free-codecs.com/download_soft.php?d=5079&s=683'; $ff2pluginspace = ($mimetype !== 'audio/aacp') ? 'http://port25.technet.com/videos/downloads/wmpfirefoxplugin.exe' : $accplugin; $wmp7pluginspace = ($mimetype !== 'audio/aacp') ? 'http://www.microsoft.com/isapi/redir.dll?prd=windows&sbp=mediaplayer&ar=Media&sba=Plugin&' : $accplugin; $wmp6pluginspace = ($mimetype !== 'audio/aacp') ? 'http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715' : 'http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715'; $state = ($text[1] == 1) ? 'Up' : 'Down'; $shotcast_state_icon = ($text[1] == 1) ? 'online.gif' : 'offline.gif'; $text[2] = !empty($text[2]) ? $text[2] : $currentlisteners; $text[3] = !empty($text[3]) ? $text[3] : $maxlisteners; $text[5] = !empty($text[5]) ? $text[5] : $bitrate; $status = isset($_GET['status']) ? $_GET['status'] : 'stop'; $player = isset($_GET['player']) ? $_GET['player'] : 'wmp'; $changeto = ($player == 'real') ? 'wmp' : 'real'; ?>includes/index.html0000755000000000000000000000355512143440606011562 0ustar Index of /radioplayer/v3/includes


Index of /radioplayer/v3/includes

Last Updated: Saturday, May 11th, 2013


File name Size Last update Description
[..]<DIR>5/11/2013, 16:3Parent directory
common.php1,3428/6/2010, 4:48
config.php9774/24/2007, 18:15
cur_display.php2,0888/6/2010, 4:48
cur_listeners.php1,8248/6/2010, 4:48
cur_song.php1,8098/6/2010, 4:48
detectScript.htm13,3542/21/2011, 13:41
getinfo.php13,5513/3/2011, 0:56

There are 7 files and 1 directories
for a total of 34945 bytes.