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.php 0000755 0000000 0000000 00000026762 12147704372 013334 0 ustar $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.php 0000755 0000000 0000000 00000007160 12147704372 013437 0 ustar $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.php 0000755 0000000 0000000 00000022435 12147704372 011573 0 ustar 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.php 0000755 0000000 0000000 00000012753 12147726506 011100 0 ustar
";
return $css;
}
?>
includes/cur_display.php 0000755 0000000 0000000 00000014214 12147704372 012615 0 ustar "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 "
![]() |
Pe HaiSaRadem.ro vei gasi bancuri, glume, imagini, video, fun, bancuri online, bancuri tari, imagini haioase, videoclipuri haioase, distractie online. Nu ne crede pe cuvant, intra pe HaiSaRadem.ro ca sa te convingi. |