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/cast_functions.php0000755000000000000000000002676212147704372013334 0ustar $v) { if(@is_object($v) OR @is_array($v)) $array[$k] = obj_to_array($v); } return $array; } function file_get_contents_utf8($fn) { $opts = array( 'http' => array( 'method'=>"GET", 'header'=>"Content-Type: text/html; charset=utf-8", 'timeout' => 60 ) ); $context = stream_context_create($opts); $result = file_get_contents($fn, false, $context); return $result; } function title_sitename($domain) { $domaintmp = explode(".", $domain); $y = count($domaintmp) - 1; $r = ""; for ($a = 0; $y > $a; $a++) { $r .= $domaintmp[$a]."."; } $r = str_replace("http://", "", $r); return $r; } function title_sitesufix($domain) { $domaintmp = explode(".", $domain); $y = count($domaintmp) - 1; $r = $domaintmp[$y]; $r = str_replace("/", "", $r); return $r; } //get website url of the current song title if such... function song_siteInfo($artist, $song, $default_value, $getInfo = 'url_picture') { static $a_www, $s_www; $a_www = explode("www.", $artist); //$a_www = !empty($a_www[1]) ? explode("http://", $song) : $a_www; $a_www = empty($a_www[1]) ? explode(".org", $artist) : $a_www; $a_www = empty($a_www[1]) ? explode(".com", $artist) : $a_www; $s_www = explode("www.", $song); //$s_www = !empty($s_www[1]) ? explode("http://", $song) : $s_www; $s_www = empty($s_www[1]) ? explode(".org", $song) : $s_www; $s_www = empty($s_www[1]) ? explode(".com", $song) : $s_www; if (!empty($a_www[1])) { $url_info = "http://".title_sitename($artist).title_sitesufix($artist)."/"; $url_picture = $url_info."favicon.ico"; //$url_picture = $default_value; } elseif (!empty($s_www[1])) { $url_info = "http://".title_sitename($song).title_sitesufix($song)."/"; $url_picture = $url_info."favicon.ico"; //$url_picture = $default_value; } else { $url_info = $default_value; $url_picture = $default_value; } return $$getInfo; } //get information of the current song title use amazone's API function aws_signed_request($params, $title, $curl) { static $response, $request; $method = "GET"; $host = "ecs.amazonaws.com"; $uri = "/onca/xml"; $params["Service"] = "AWSECommerceService"; $params["AWSAccessKeyId"] = "0ZYCZQTQW9GRW4AY2602"; $params["Timestamp"] = gmdate("Y-m-d\TH:i:s\Z"); $params["Version"] = "2013-05-16"; ksort($params); $canonicalized_query = array(); foreach ($params as $param=>$value) { $param = str_replace("%7E", "~", rawurlencode($param)); $value = str_replace("%7E", "~", rawurlencode($value)); $canonicalized_query[] = $param."=".$value; } $canonicalized_query = implode("&", $canonicalized_query); $string_to_sign = $method."\n".$host."\n".$uri."\n".$canonicalized_query; $signature = base64_encode(hash_hmac("sha256", $string_to_sign, "LFpXAmTy+mZjDWISXr7bGkTVMapgrgUorRKEUOin", True)); $signature = str_replace("%7E", "~", rawurlencode($signature)); $request = "http://".$host.$uri."?".$canonicalized_query."&Signature=".$signature; if($curl == "yes") { $response = curl_file_get_contents($request); } $response = @file_get_contents($request); /* if(!$response) { $fp = @fsockopen($host, 80, $errno, $errstr, 5); @fputs($fp,"GET /".$uri."?".$canonicalized_query."&Signature=".$signature." HTTP/1.0\r\nUser-Agent: XML Getter (Mozilla Compatible)\r\n\r\n"); while(!feof($fp)) { $response .= fgets($fp, 1000); } $response = substr($response, 7); $response = substr($response, 0, strlen($response) - 6); } */ if ($response === false) { return false; } else { $parsed_xml = @simplexml_load_string($response); if ($parsed_xml === false) { return false; } else { //print_r($parsed_xml); return $parsed_xml; } } } // Get image thingy by drknas... function aws_search_album($params, $title, $curl) { static $response, $request; $method = "GET"; $host = "ecs.amazonaws.com"; $uri = "/onca/xml"; $params["Service"] = "AWSECommerceService"; $params["AWSAccessKeyId"] = "0ZYCZQTQW9GRW4AY2602"; $params["Timestamp"] = gmdate("Y-m-d\TH:i:s\Z"); $params["Version"] = "2013-05-16"; ksort($params); $canonicalized_query = array(); foreach ($params as $param=>$value) { $param = str_replace("%7E", "~", rawurlencode($param)); $value = str_replace("%7E", "~", rawurlencode($value)); $canonicalized_query[] = $param."=".$value; } $canonicalized_query = implode("&", $canonicalized_query); $string_to_sign = $method."\n".$host."\n".$uri."\n".$canonicalized_query; $signature = base64_encode(hash_hmac("sha256", $string_to_sign, "LFpXAmTy+mZjDWISXr7bGkTVMapgrgUorRKEUOin", true)); $signature = str_replace("%7E", "~", rawurlencode($signature)); $request = "http://".$host.$uri."?".$canonicalized_query."&Signature=".$signature; if($curl == "yes") { $response = curl_file_get_contents($request); } if ($response === false) { $response = @file_get_contents($request); } if ($response === false) { $canonicalized_query = "Service=AWSECommerceService&AWSAccessKeyId=0ZYCZQTQW9GRW4AY2602&AssociateTag=knas-20&Operation=ItemSearch&ResponseGroup=Medium,Offers&SearchIndex=Music&Keywords=".$title."&ItemPage="; $fp = @fsockopen($host, 80, $errno, $errstr, 5); if($fp) { @fputs($fp,"GET /".$uri."?".$canonicalized_query." HTTP/1.0\r\nUser-Agent: XML Getter (Mozilla Compatible)\r\n\r\n"); while(!feof($fp)) { $response .= fgets($fp, 1000); } $response = substr($response, 7); $response = substr($response, 0, strlen($response) - 6); } } if ($response === false) { return false; } else { $parsed_xml = @simplexml_load_string($response); if ($parsed_xml === false) { return false; } else { //print_r($parsed_xml); return $parsed_xml; } } } function aws_get_wanted_data($parsed_xml) { $numOfItems = $parsed_xml->Items->TotalResults; $wanted_data = array(); if($numOfItems > 0) { $first = $parsed_xml->Items->Item[0]; $wanted_data[0] = $first->SmallImage->URL; $wanted_data[1] = $first->DetailPageURL; return $wanted_data; } if($numOfItems < 1) { return false; } } //get information of the current song use amazone's API by Ory (but yet put here only for refrence) function aws_searchInfo($artist, $song, $title, $getInfo = 'url_picture', $url_picture = 'nochange', $search = 'DigitalMusic') { static $url_info, $album_url; global $curl; $parsed_xml = $url_picture; $parsed_xml = aws_signed_request(array("AssociateTag"=>"knas-20","Operation"=>"ItemSearch","SearchIndex"=>$search,"ResponseGroup"=>"Medium,Offers","Keywords"=>clean_string_alpha_num($title)), $title, $curl); $data = @is_object($parsed_xml) ? aws_get_wanted_data($parsed_xml) : ""; if(is_array($data)) { $url_picture = $data[0]; $url_info = $data[1]; } else { return $default; } return $$getInfo; } //get information of the current song use last.fm's API function aws_getInfo($artist, $song, $method = 'track', $getInfo = 'url_picture', $default = 'nochange') { static $image_s, $album_url, $request; global $curl, $skininfo; $host = "http://ws.audioscrobbler.com"; $uri = "/2.0/"; $api_keyId = "470df9d6f46d4c28d221483ffdcf6062"; $request = str_replace('#','', $host.$uri.'?method=track.getInfo&api_key='.$api_keyId.'&artist='.urlencode($artist).'&track='.urlencode($song)); $xml = @simplexml_load_file($request, 'SimpleXMLElement', LIBXML_NOCDATA); //print_r($xml); if (!is_object($xml)) { return $default; } $xml = obj_to_array($xml); if (!is_array($xml)) { return $default; } if(!empty($xml[$method]['album']['image'])) { //Picture size taken from skin configuration; Valid values are: 0 for small; 1 for medium; 2 for large; and 3 for eXtrem large; $skininfo['image'] = !empty($skininfo['image']) ? $skininfo['image'] : 0; $skinimage = $xml[$method]['album']['image'][$skininfo['image']]; } if(!empty($xml[$method]['wiki']['summary'])) { $wikisummary = $xml[$method]['wiki']['summary']; $wikicontent = $xml[$method]['wiki']['content']; } if(!empty($xml[$method]['album']['title'])) { $album_title = $xml[$method]['album']['title']; $album_url = $xml[$method]['album']['url']; } $lastfm_url = $xml[$method]['url']; if(!empty($xml[$method]['artist']['url'])) { $artist_url = $xml[$method]['artist']['url']; } $url_picture = !empty($skinimage) ? $skinimage : $default; $url_info = !empty($album_url) ? $album_url : $default; return $$getInfo; } ?>includes/cd_cover_getter.php0000755000000000000000000000716012147704372013437 0ustar $value) { $param = str_replace("%7E", "~", rawurlencode($param)); $value = str_replace("%7E", "~", rawurlencode($value)); $canonicalized_query[] = $param."=".$value; } $canonicalized_query = implode("&", $canonicalized_query); $string_to_sign = $method."\n".$host."\n".$uri."\n".$canonicalized_query; $signature = base64_encode(hash_hmac("sha256", $string_to_sign, "LFpXAmTy+mZjDWISXr7bGkTVMapgrgUorRKEUOin", true)); $signature = str_replace("%7E", "~", rawurlencode($signature)); $request = "http://".$host.$uri."?".$canonicalized_query."&Signature=".$signature; if($curl == "yes") { $response = curl_file_get_contents($request); } if ($response === false) { $response = @file_get_contents($request); } if ($response === false) { $canonicalized_query = "Service=AWSECommerceService&AWSAccessKeyId=0ZYCZQTQW9GRW4AY2602&AssociateTag=knas-20&Operation=ItemSearch&ResponseGroup=Medium,Offers&SearchIndex=Music&Keywords=".$title."&ItemPage="; $fp = @fsockopen($host, 80, $errno, $errstr, 5); if($fp) { @fputs($fp,"GET /".$uri."?".$canonicalized_query." HTTP/1.0\r\nUser-Agent: XML Getter (Mozilla Compatible)\r\n\r\n"); while(!feof($fp)) { $response .= fgets($fp, 1000); } $response = substr($response, 7); $response = substr($response, 0, strlen($response) - 6); } } if ($response === false) { return false; } else { $parsed_xml = @simplexml_load_string($response); if ($parsed_xml === false) { return false; } else { return $parsed_xml; } } } function get_wanted_data($parsed_xml) { $numOfItems = $parsed_xml->Items->TotalResults; if($numOfItems > 0) { $first = $parsed_xml->Items->Item[0]; $wanted_data[] = $first->SmallImage->URL; $wanted_data[] = $first->DetailPageURL; return $wanted_data; } if($numOfItems < 1) { return false; } } ?>includes/common.php0000755000000000000000000002243512147704372011573 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 != 80) ? ":".$server_port : "") . $script_name . '/' ); $is_block = false; } else { define('ADDON_URL', PORTAL_URL . $module_root_path); } if(isset($_GET["language"])) { $language = $_GET["language"]; } elseif(isset($_GET["lang"])) { $language = $_GET["lang"]; } else { if(empty($language)) { $language = "english"; } } $clean_language = preg_replace("/[^a-zA-Z0-9_.-@]/", "", $language); if ((@include $module_root_path . "language/lang_" . $clean_language . "/lang_main.$phpEx") === false) { if ((@include $module_root_path . "language/lang_english/lang_main.$phpEx") === false) { die('Language file ' . $module_root_path. "lang_" . $clean_language . "/lang_main.$phpEx" . ' couldn\'t be opened.'); } } if(empty($caster_ip)) { $caster_ip = "localhost"; $lang['Off_Air'] = $lang['Edit_Config']; @define('SHOTCAST_INSTALLED', false); } else { @define('SHOTCAST_INSTALLED', true); } if(empty($caster_port)) { $caster_port = "8000"; } if(empty($caster_internal_port)) { $caster_internal_port = "8000"; } if(empty($caster)) { $caster = "shout"; } if(empty($playlist_pls)) { $playlist_pls = "listen.pls"; } if(empty($playlist_ip)) { $playlist_ip = $caster_ip; $playlist_port = $caster_port; } //Setup defualt skin, then overwrite it with your configuration skin $default_skin = "default"; if(!empty($radio_skin)) { $default_skin = $radio_skin; } if(isset($_GET["skin"])) { $radio_skin = $_GET["skin"]; } elseif(isset($_GET["style"])) { $radio_skin = $_GET["style"]; } else { if(empty($radio_skin)) { $radio_skin = "default"; } } $radio_skin = preg_replace("/[^a-zA-Z0-9_.-@]/", "", $radio_skin); if (@file_exists($module_root_path . "skins/" . $radio_skin . "/skin_config.$phpEx") === false) { $radio_skin = $default_skin; //die('Requested skin and default skin configuration file couldn\'t be found.'); } @define('SKIN', $radio_skin); if(empty($disable_clean_string)) { $disable_clean_string = "no"; } require($module_root_path ."includes/cast_functions." . $phpEx); if($caster === "shout") { $icecast_mount_point = ""; $getinfo = $module_root_path . "includes/getinfo_shout." . $phpEx; } else { $getinfo = $module_root_path . "includes/getinfo_ice." . $phpEx; } require($getinfo); //Setup some vars if(!empty($stream_title)) { $station_name = $stream_title; } elseif(empty($station_name)) { $station_name = "Radio Station"; } if(!empty($server_name)) { $h = $server_name = $station_name; } elseif(empty($station_name)) { $h = $server_name = "Radio Station"; } $a = $currentsong; $b = $currentlisteners; $c = $maxlisteners; $d = $mimetype; $e = $stream_genre; $f = $bitrate; $g = $peaklisteners; $h = $server_name; $i = $server_description; $j = $quality; $k = $video_quality; $l = $frame_size; $m = $frame_rate; $n = $server_url; $o = $artist; $p = ""; $q = ""; $r = ""; $s = ""; $t = ""; $u = ""; $v = ""; $w = ""; $x = ""; $y = ""; $z = ""; $update_title = "5000"; $accplugin = 'http://retro-radio.net/plugin/setup_AAC_aacPlus_plugin_1_0_36.exe'; $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'; if(!empty($stream_title)) { $station_name = $stream_title; } elseif(empty($station_name)) { $station_name = "Radio Station"; } require($module_root_path ."config/display_config." . $phpEx); require($module_root_path . "skins/" . $radio_skin . "/skin_config." . $phpEx); require($module_root_path ."includes/css." . $phpEx); require($module_root_path ."includes/java_script." . $phpEx); //require($module_root_path ."includes/cd_cover_getter." . $phpEx); //Removed by DrKnas in v. 4.21 - To do!!!! $full_wmp_playlist_url = $playlist_ip . ":" . $playlist_port . (!empty($playlist_asx) ? "/" . $playlist_asx : ""); $full_real_and_quick_playlist_url = $playlist_ip . ":" . $playlist_port . (!empty($playlist_pls) ? "/" . $playlist_pls : ""); ?>includes/css.php0000755000000000000000000001275312147726506011100 0ustar "; return $css; } ?> includes/cur_display.php0000755000000000000000000001421412147704372012615 0ustar "knas-20", "Operation"=>"ItemSearch", "SearchIndex"=>$search, "ResponseGroup"=>"Medium,Offers", "Keywords"=>clean_string_alpha_num($title)), $title, $curl); if ($parsed_xml === false) { $search = "MP3Downloads"; $parsed_xml = aws_search_album(array("AssociateTag"=>"knas-20", "Operation"=>"ItemSearch", "SearchIndex"=>$search, "ResponseGroup"=>"Medium,Offers", "Keywords"=>clean_string_alpha_num($title)), $title, $curl); } $data = @is_object($parsed_xml) ? aws_get_wanted_data($parsed_xml) : ""; if(is_array($data)) { $url_picture = ($url_picture != 'nochange') ? $url_picture : $data[0]; if(!empty($data[1]) && ($data[0] != $data[1])) { $url_info = ($url_info != $no_cover_url) ? $url_info : $data[1]; } } /* if (isset($parsed_xml->Items->Item->SmallImage->URL)) { $url_picture = ($url_picture != 'nochange') ? $url_picture : $parsed_xml->Items->Item->SmallImage->URL; $url_info = ($url_info != 'nochange') ? $url_picture : (isset($parsed_xml->Items->Item->DetailPageURL) ? $parsed_xml->Items->Item->DetailPageURL : $url_picture); } */ } if ($url_picture == "nochange") { if($fallback == "logo") { $url_picture = $module_root_bang . "logos/" . $logo_name; } else { $url_picture = $module_root_bang. "skins/" . SKIN . "/equalizer_play.gif"; } } } } } if($picture == "logo") { $url_picture = $module_root_bang . "logos/" . $logo_name; //Try FavIcon.Ico if a site is found in song title $url_picture = song_siteInfo($artist, $song, $url_picture, 'url_picture'); } //Blank Picture check for Curenct Picture ver 3.x if(empty($url_picture)) { if($fallback == "logo") { $url_picture = $module_root_bang . "logos/" . $logo_name; } else { $url_picture = $module_root_bang. "skins/" . SKIN . "/equalizer_play.gif"; } } $old_title = asc2hex($currentsong); // generate the XML headers header('Content-type: text/xml'); echo ''; if($disable_clean_string == "no") { $title = clean_string($title); $server_description = clean_string($server_description); $server_url = clean_string($server_url); $firstinfo = clean_string($firstinfo); $secondinfo = clean_string($secondinfo); $thirdinfo = clean_string($thirdinfo); $forthinfo = clean_string($forthinfo); } else { $title = trim($title); $server_description = trim($server_description); $server_url = trim($server_url); $firstinfo = trim($firstinfo); $secondinfo = trim($secondinfo); $thirdinfo = trim($thirdinfo); $forthinfo = trim($forthinfo); } // generate the XML Response print " ".htmlentities(clean_string($title))." ".htmlentities(clean_string($firstinfo))." ".htmlentities(clean_string($secondinfo))." ".htmlentities(clean_string($thirdinfo))." ".htmlentities(clean_string($forthinfo))." ".htmlentities($update_title)." ".htmlentities($url_picture)." ".htmlentities($url_info)." ".htmlentities($server_description)." ".htmlentities($server_url)." ".htmlentities($old_title)." "; ?> includes/cur_listeners.php0000755000000000000000000000477412145256410013163 0ustar
BluePink BluePink
XHost
Gazduire site-uri web nelimitata ca spatiu si trafic lunar la doar 15 eur / an. Inregistrare domenii .ro .com .net .org .info .biz .com.ro .org.ro la preturi preferentiale. Pentru oferta detaliata accesati site-ul BluePink
' . $currentlisteners . ''; ?> includes/cur_picture.php0000755000000000000000000001101212147473056012616 0ustar "knas-20", "Operation"=>"ItemSearch", "SearchIndex"=>$search, "ResponseGroup"=>"Medium,Offers", "Keywords"=>clean_string_alpha_num($title)), $title, $curl); if ($parsed_xml === false) { $search = "MP3Downloads"; $parsed_xml = aws_search_album(array("AssociateTag"=>"knas-20", "Operation"=>"ItemSearch", "SearchIndex"=>$search, "ResponseGroup"=>"Medium,Offers", "Keywords"=>clean_string_alpha_num($title)), $title, $curl); } $data = @is_object($parsed_xml) ? aws_get_wanted_data($parsed_xml) : ""; if(is_array($data)) { $url_picture = ($url_picture != 'nochange') ? $url_picture : $data[0]; $url_info = ($url_info != $no_cover_url) ? $url_info : $data[1]; } if (isset($parsed_xml->Items->Item->SmallImage->URL)) { $url_picture = ($url_picture != 'nochange') ? $url_picture : $parsed_xml->Items->Item->SmallImage->URL; $url_info = ($url_picture != 'nochange') ? $url_picture : $parsed_xml->Items->Item->DetailPageURL; } } if ($url_picture == "nochange") { if($fallback == "logo") { $url_picture = $module_root_bang . "logos/" . $logo_name; } else { $url_picture = $module_root_bang. "skins/" . SKIN . "/equalizer_play.gif"; } } } if($picture == "logo") { $url_picture = $module_root_bang . "logos/" . $logo_name; //Try FavIcon.Ico if a site is found in song title $url_picture = song_siteInfo($artist, $song, $url_picture, 'url_picture'); } //Blank Picture check for Curenct Picture ver 3.x if (empty($url_picture)) { if($fallback == "logo") { $url_picture = $module_root_bang . "logos/" . $logo_name; } else { $url_picture = $module_root_bang. "skins/" . SKIN . "/equalizer_play.gif"; } } $old_title = asc2hex($currentsong); if($mode == 'url_picture') { die("$url_picture"); } else { die("$$mode"); } ?>includes/cur_song.php0000755000000000000000000000532212147726506012121 0ustar ' . $title . '   '; ?>includes/cur_url.php0000755000000000000000000000744712147704372011764 0ustar "knas-20", "Operation"=>"ItemSearch", "SearchIndex"=>$search, "ResponseGroup"=>"Medium,Offers", "Keywords"=>clean_string_alpha_num($title)), $title, $curl); if ($parsed_xml === false) { $search = "MP3Downloads"; $parsed_xml = aws_search_album(array("AssociateTag"=>"knas-20", "Operation"=>"ItemSearch", "SearchIndex"=>$search, "ResponseGroup"=>"Medium,Offers", "Keywords"=>clean_string_alpha_num($title)), $title, $curl); } $data = @is_object($parsed_xml) ? aws_get_wanted_data($parsed_xml) : ""; if(is_array($data)) { $url_info = ($url_info != $no_cover_url) ? $url_info : $data[1]; } if (isset($parsed_xml->Items->Item->SmallImage->URL)) { $url_info = ($url_picture != 'nochange') ? $url_picture : $parsed_xml->Items->Item->DetailPageURL; } } } } } $old_title = asc2hex($currentsong); if($mode == 'url_info') { die("$url_info"); } else { die("$$mode "); } ?>includes/getinfo_ice.php0000755000000000000000000002413212147704372012552 0ustar ]*class=\"streamdata\">(.*)<\/td>/isU' , $page, -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY); //die("$page"); //for( $i = 0; $i < $n = count($page_array); $i++ ) //{ // $state = "Up"; //} $mount_points = explode("_END_",$page); if(count($mount_points) < 2) { return FALSE; } foreach ($mount_points as $value) { if ( ( $value !== '_END_' ) && !empty( $value ) ) { $info = explode("|",$value); if(isset($info[0])) { $mountpoint = explode("_START_", $info[0]); if(count($mountpoint) > 1) { $status[$info[0]]['mount'] = preg_replace("/[\n\r]/","",$mountpoint[1]) ; } else { $status[$info[0]]['mount'] = preg_replace("/[\n\r]/","",$mountpoint[0]) ; } } if(isset($info[1])) { $status[$info[0]]['server_name'] = preg_replace("/[\n\r]/","",$info[1]) ; } if(isset($info[2])) { $status[$info[0]]['server_description'] = preg_replace("/[\n\r]/","",$info[2]) ; } if(isset($info[3])) { $status[$info[0]]['server_type'] = preg_replace("/[\n\r]/","",$info[3]) ; } if(isset($info[4])) { $status[$info[0]]['bitrate'] = preg_replace("/[\n\r]/","",$info[4]) ; } if(isset($info[5])) { $status[$info[0]]['quality'] = preg_replace("/[\n\r]/","",$info[5]) ; } if(isset($info[6])) { $status[$info[0]]['video_quality'] = preg_replace("/[\n\r]/","",$info[6]) ; } if(isset($info[7])) { $status[$info[0]]['frame_size'] = preg_replace("/[\n\r]/","",$info[7]) ; } if(isset($info[8])) { $status[$info[0]]['frame_rate'] = preg_replace("/[\n\r]/","",$info[8]) ; } if(isset($info[9])) { $status[$info[0]]['listeners'] = preg_replace("/[\n\r]/","",$info[9]) ; } if(isset($info[10])) { $status[$info[0]]['listener_peak'] = preg_replace("/[\n\r]/","",$info[10]) ; } if(isset($info[11])) { $status[$info[0]]['genre'] = preg_replace("/[\n\r]/","",$info[11]) ; } if(isset($info[12])) { $status[$info[0]]['server_url'] = preg_replace("/[\n\r]/","",$info[12]) ; } if(isset($info[13])) { $status[$info[0]]['artist'] = preg_replace("/[\n\r]/","",$info[13]) ; } if(isset($info[14])) { $status[$info[0]]['title'] = preg_replace("/[\n\r]/","",$info[14]) ; } $status[$streamdata]['status'] = 'Up'; } } if(isset($status)) { return $status; } else { return FALSE; } } else { $status[$streamdata]['status'] = 'Socket'; return $status; } @fclose($fp); # error_reporting(E_ALL ^ E_NOTICE); } /* based on function by Jude http://jude.im/ FlorinCB works with Icecast 2.3.2 */ function getStreamInfo($ice_caster_ip, $ice_caster_port, $icecast_mount_point) { static $streamdata; $status = array(); $str = @file_get_contents('http://'.$ice_caster_ip.":".$ice_caster_port.'/status.xsl?mount='.$icecast_mount_point); if(!$str) { $fp = @fsockopen($ice_caster_ip, $ice_caster_port, $errno, $errstr, 5); if($fp) { @fputs($fp,"GET /status.xsl?mount=".$icecast_mount_point." HTTP/1.0\r\nUser-Agent: XML Getter (Mozilla Compatible)\r\n\r\n"); while(!@feof($fp)) { $str .= @fgets($fp, 1000); } } else { $status[$streamdata]['status'] = 'Down'; } } if(preg_match_all('/]*class=\"streamdata\">(.*)<\/td>/isU', $str, $match)) { //Stream Title: title 1,0 //Stream Description: description 1.1 //Content Type: audio/mpeg type 1,2 //Mount started: Thu, 16 May 2013 09:39:02 -0500 start 1.3 //Bitrate: 56 bitrate 1,4 //Current Listeners: 3 listeners 1,5 //Peak Listeners: 3 max_listeners 1,6 //Stream Genre: Various genre 1,7 //Stream URL: http://www.scweb.tld/ stream_url 1,8 //Current Song: Artist - Song - Album $status[$streamdata]['status'] = 'Up'; $status[$streamdata]['title'] = $match[1][0]; $status[$streamdata]['description'] = $match[1][1]; $status[$streamdata]['type'] = $match[1][2]; $status[$streamdata]['start'] = $match[1][3]; $status[$streamdata]['bitrate'] = $match[1][4]; $status[$streamdata]['listeners'] = $match[1][5]; $status[$streamdata]['max_listeners'] = $match[1][6]; $status[$streamdata]['genre'] = $match[1][7]; $status[$streamdata]['stream_url'] = $match[1][8]; $status[$streamdata]['artist_song'] = $match[1][9]; $x = explode(" - ", $match[1][9]); $status[$streamdata]['artist'] = !empty($x[0]) ? $x[0] : $match[1][9]; $status[$streamdata]['song'] = !empty($x[1]) ? $x[1] : $match[1][9]; } else { $status[$streamdata]['status'] = 'Down'; } if(!$str) { $status[$streamdata]['status'] = 'Socket'; } return $status; } ?>includes/getinfo_shout.php0000755000000000000000000001562012147704372013156 0ustar
.*~", "", $page); //extract data $page_array = preg_split('~(]+>)~' , $page, -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY); if(count($page_array) > 10) { for( $i = 0; $i < count( $page_array ); $i++ ) { $state = "Up"; if($page_array[$i] == "Server Status: ") { $server_status = strip_tags($page_array[$i+6]); } if($page_array[$i] == "Stream Status: ") { $bitrate = preg_replace("/ kbps.*/", "", preg_replace("/.*at /", "", $page_array[$i+6])); $currentlisteners = preg_replace("/of.*/", "", $page_array[$i+8]); $maxlisteners = preg_replace("/ listeners.*/", "", preg_replace("/.*of/", "", $page_array[$i+8])); } if($page_array[$i] == "Listener Peak: ") { $peaklisteners = strip_tags($page_array[$i+6]); } if($page_array[$i] == "Stream Title: ") { $stream_title = strip_tags($page_array[$i+6]); } if($page_array[$i] == "Content Type: ") { $mimetype = strip_tags($page_array[$i+6]); } if($page_array[$i] == "Stream Genre: ") { $stream_genre = strip_tags($page_array[$i+6]); } if($page_array[$i] == "Stream URL: ") { $stream_url = strip_tags($page_array[$i+6]); } if($page_array[$i] == "Current Song: ") { $currentsong = strip_tags($page_array[$i+6]); } } } else { $state = $server_status = "Down"; $peaklisteners = 1; $bitrate = "56"; $stream_title = "Stream"; $currentsong = "Track"; $server_url = "http://".$shout_caster_ip.":".$shout_caster_port."/"; //$mimetype = "audio/mpeg"; $lang['Off_Air'] = $lang['Socket_functions_disabled']; } } @fclose($fp); $x = explode(" - ", $currentsong); $artist = !empty($x[0]) ? $x[0] : $currentsong; $song = !empty($x[1]) ? $x[1] : $currentsong; $server_description[1] = sprintf($lang['Description_Status'] ." kbps - ". $lang['listeners'] .": %s", $bitrate, $peaklisteners); $server_description[2] = !empty($server_status) ? $server_status : $stream_title; $server_description[3] = $stream_title; $choice = rand(1, 3); $server_description = $server_description[$choice]; $server_url = !empty($stream_url) ? $stream_url : "http://".$shout_caster_ip.":".$shout_caster_port."/"; // The "i" after the pattern delimiter indicates a case-insensitive search if (preg_match("/Unauthorized/", $stream_title)) { $servertitle = $stream_title = $station_name; } if (preg_match("/Unauthorized/", $stream_genre)) { $servergenre = $stream_genre = $radio->genre(); } if (preg_match("/Unauthorized/", $stream_url)) { $songurl = $stream_url = ""; } if (preg_match("/Unauthorized/", $server_url)) { $serverurl = $server_url = $lang['require_password']; } if (@preg_match("/Unauthorized/", $currentlisteners)) { $currentlisteners = 'n/a'; } if (preg_match("/Unauthorized/", $bitrate)) { $bitrate = 'n/a'; } #error_reporting(E_ALL ^ E_NOTICE); ?>includes/index.html0000755000000000000000000000357712143426334011570 0ustar Index of /radioplayer/v4/includes


Index of /radioplayer/v4/includes

Last Updated: Saturday, May 11th, 2013


File name Size Last update Description
[..]<DIR>5/11/2013, 16:3Parent directory
cd_cover_getter.php2,27211/22/2008, 0:10
common.php6,0353/3/2011, 0:57
css.php3,97711/22/2008, 0:9
cur_display.php2,65311/22/2008, 0:9
getinfo_ice.php5,3132/17/2009, 19:39
getinfo_shout.php3,1063/3/2011, 0:44
java_script.php19,74612/27/2008, 1:9

There are 7 files and 1 directories
for a total of 43102 bytes.
includes/java_script.php0000755000000000000000000006450212226752636012615 0ustar "; } ?>