Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- error_reporting(0);
- ini_set("display_errors",0);
- header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
- header("Cache-Control: no-store, no-cache, must-revalidate"); // HTTP/1.1
- header("Cache-Control: post-check=0, pre-check=0", false);
- header("Pragma: no-cache"); // HTTP/1.0
- header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); // Date in the past
- @$host = 'yoda.hosthb.com';
- @$port = '9982';
- @$ch = curl_init();
- @curl_setopt($ch, CURLOPT_URL, "http://".$host.":".$port."/index.html");
- @curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla");
- @curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
- @curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 2);
- $data = @curl_exec($ch);
- $locutor = @explode("<font class=default>Stream Title: </font></td><td><font class=default><b>", $data);
- $locutor = @explode("</b></td></tr>", $locutor[1]);
- $locutor = @strip_tags(addslashes(utf8_encode($locutor[0])));
- if($locutor == ''){
- $locutor = 'Offline';
- }
- $programa = @explode("<font class=default>Stream Genre: </font></td><td><font class=default>", $data);
- $programa = @explode("<b>", $programa[1]);
- $programa = @explode("</b></td></tr>", $programa[1]);
- $programa = @strip_tags(addslashes(utf8_encode($programa[0])));
- if($programa == ''){
- $programa = 'Auto';
- }
- $musica = @explode("<font class=default>Current Song: </font></td><td><font class=default><b>", $data);
- $musica = @explode("</b></td></tr>", $musica[1]);
- $musica = @strip_tags(addslashes(utf8_encode($musica[0])));
- if($musica == ''){
- $musica = 'HapDev';
- }
- $unicos = @explode("<b>Stream is up at ", $data);
- $unicos = @explode("(", $unicos[1]);
- $unicos = @explode(" unique)", $unicos[1]);
- $unicos = $unicos[0];
- if($unicos < 10){
- $unicos = "0".$unicos;
- }
- if($locutor == 'Offline'){
- $avatar = 'HapDev';
- }else{
- $avatar = trim($locutor);
- }
- if($locutor == 'Offline'){
- $quarto = 'Offline';
- $quarto_id = 'Null';
- }else{
- // Antônio deverá fazer o quarto pois precisa se conectar à sql.
- $quarto = 'HapDev';
- $quarto_id = '3';
- }
- @curl_close($ch);
- if(isset($_GET['get']) && $_GET['get'] == 'data'){
- $data = array(
- 'avatar' => $avatar,
- 'locutor' => $locutor,
- 'musica' => $musica,
- 'unicos' => $unicos,
- 'quarto' => $quarto,
- 'quarto_id' => $quarto_id,
- );
- }
- // ATUALIZADOR
- if($_GET['ver'] == "locutor"){
- echo"$locutor";
- }
- if($_GET['ver'] == "unicos"){
- echo"$unicos Ouvintes ";
- }
- if($_GET['ver'] == "musica"){
- echo "$musica";
- }
- if($_GET['ver'] == "programa"){
- echo"$programa";
- }
- // ATUALIZADOR
- ?>
- <!doctype html>
- <html>
- <head>
- <meta charset="utf-8">
- <link href="player/css/reset.css" rel="stylesheet" type="text/css"/>
- <link href="player/css/style.css" rel="stylesheet" type="text/css"/>
- <link href="player/css/jquery-ui.css" rel="stylesheet" type="text/css"/>
- <link href="player/css/jquery-ui.min.css" rel="stylesheet" type="text/css"/>
- <link href="player/css/jquery-ui.structure.css" rel="stylesheet" type="text/css"/>
- <link href="player/css/jquery-ui.structure.min.css" rel="stylesheet" type="text/css"/>
- <link href="player/css/jquery-ui.theme.css" rel="stylesheet" type="text/css"/>
- <link href="player/css/jquery-ui.theme.min.css" rel="stylesheet" type="text/css"/>
- <script src="js/jquery-1.11.3.min.js" type="text/javascript"></script>
- <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.0/jquery.min.js"></script>
- <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.9/jquery-ui.min.js"></script>
- <!--<meta http-equiv="refresh" content="1;player.php">-->
- <title>Player HP</title>
- <script>
- $(document).ready(function(){
- $('#play-pause').click(function(){
- var classeAtual = $(this).attr('class');
- if (classeAtual=='play'){
- PlayerPause();
- }
- else {
- PlayerPlay();
- }
- $(this).toggleClass('play').toggleClass('pause');
- $(this).attr('title', classeAtual=='play'? 'Play':'Pause');
- });
- });
- </script>
- <script>
- function atualiza_dados(id, caminho)
- {
- $("#" + id).html("...");
- $("#" + id).fadeOut(1000);
- $("#" + id).load("_php/status.php?ver=" + caminho);
- $("#" + id).fadeIn(2000);
- }
- </script>
- <script type="text/javascript">
- $(function(){
- $('.atualizarradio').submit(function(){
- $.ajax({
- url: 'dadosPlayer.php',
- type: 'POST',
- data: $('.atualizarradio').serialize(),
- success: function( data ){
- $('#container_radio').html(data);
- }
- });
- return false;
- });
- });
- </script>
- </head>
- <body class="pl" style="width:100%; overflow: hidden;">
- <div style="display: none">
- <script>
- function auto(){
- document.getElementById('player2').volume = 0;
- }
- </script>
- <body onload="auto()">
- <audio id="player2" controls autoplay src="http://stm30.srvstm.com:28112/;"></audio>
- <!-- minimizar radio -->
- <script>
- $(document).ready(function(){
- $("#stop").click(function(event){
- event.preventDefault();
- $("#area_player").css({"transition":"1s","margin-top":"-100px"});
- $(".att").css({"transition":"1s","margin-top":"-100px","display":"block"});
- $("#miniplayer").css({"transition":"1s","margin-top":"0px"});
- $("#container_radio").css({"transition":"1s","height":"30px", "width":"280px"});
- });
- $("#maxmizar").click(function(event){
- event.preventDefault();
- $("#miniplayer").css({"transition":"1s","margin-top":"-50px"});
- $(".att").css({"transition":"1s","margin-top":"0px","display":"block"});
- $("#area_player").css({"transition":"1s","margin-top":"0px"});
- $("#container_radio").css({"transition":"1s","height":"90px", "width":"280px"});
- });
- });
- </script>
- <script>
- var stream = document.getElementById("player2");
- function getVolume() {
- alert(stream.volume);
- }
- function SetVolumeLower() {
- stream.volume -= 0.05;
- }
- function SetVolumeHigher() {
- stream.volume += 0.05;
- }
- function UpdateAudio(){
- var update = document.getElementById('player2'); player2.src='http://stm30.srvstm.com:28112/;'; player2.load();
- }
- function PlayerPlay(){
- document.getElementById('player2').muted = false;
- event.preventDefault();
- }
- function PlayerPause(){
- document.getElementById('player2').muted = true;
- event.preventDefault();
- }
- </script>
- </div>
- <style>
- .atualizarradio{
- width: 280px;
- height:0px;
- position: relative;
- margin: auto;
- z-index: 99999;
- }
- .att{
- background:url(http://i.imgur.com/2st4p6j.png) no-repeat 0 0;
- width:22px;
- height:17px;
- display:block;
- overflow:hidden;
- outline:none;
- border: 0px;
- cursor: pointer;
- position: absolute;
- z-index: 999999;
- font-size: 0px;
- left: 251px;
- top:45px;
- }
- </style>
- <script>
- $( function() {
- function position() {
- $( ".positionable" ).position({
- of: $( "#arrastarplayer" )
- });
- }
- $( ".atualizarradio" ).draggable({ axis: "x" });
- position();
- } );
- </script>
- <form method="" action="" class="atualizarradio">
- <input type="submit" class="att" name="AtualizarRadio" title="Atualizar informações">
- <div id="container_radio">
- <div id="area_player">
- <div class="container_player">
- <table style="width:260px; position: relative; margin: auto; top: -5px; background: transparent;">
- <tr>
- <td>
- <table style="width: 70px; height:70px; background: transparent; border-right: 1px solid #000000">
- <tr>
- <td colspan="2">
- <a class="play" title="Stop" id="play-pause"></a>
- <!-- -->
- </td>
- </tr>
- <tr>
- <td>
- <a class="link" title="Diminuir volume" id="menos" title="Abaixar volume" onclick="SetVolumeLower()"></a>
- </td>
- <td>
- <a class="link" title="Almentar volume" onclick="SetVolumeHigher()" id="mais"></a>
- </td>
- </tr>
- </table>
- </td>
- <td style="display: block; background: transparent; height:85px; overflow: hidden;">
- <table>
- <tr>
- <td>
- <p class="p_radio"><img style="position: relative; top:2px;" title="Dj" src="http://i.imgur.com/wdDay4M.png"> <font title="Locutor" style="position: relative; left:4px; top:-2px; font-size: 18px; font-family: calibri;"><?php echo $locutor ?> - DJ</font></p>
- <p class="p_radio"><img style="position: relative; top:-3px; left:-2px;" title="Programação" src="http://i.imgur.com/jTCfwio.png"> <font title="Programação" style="position: relative; top:-6px; "><?php echo $programa; echo " - <font title='Ouvintes' style='color: orange;' >".$unicos."</font>" ?></font></p>
- <p class="p_radio"><img style="position: relative; top:-12px; left:-2px;" title="Musica" src="http://i.imgur.com/mECappD.png"> <font title="Musica" style="position: relative; top:-8px; "><MARQUEE style="position:relative;" HEIGHT=20 WIDTH=100 DIRECTION=LEFT SCROLLAMOUNT=5><font style="position:relative; top:6px;"><?php echo $musica ?></font></MARQUEE></font></p>
- </td>
- </tr>
- </table>
- </td>
- <td>
- <table>
- <tr>
- <td colspan="2">
- <a id="stop" style="position:relative; left:33px;" title="Minimizar Player" data-element="#area_player"></a>
- </td>
- </tr>
- <tr>
- <td>
- <img style="position:relative; top:15px;" src="http://i.imgur.com/pmp66wJ.png" id="arrastarplayer">
- </td>
- <td>
- <img onclick="UpdateAudio()" style="cursor: pointer; position: relative; top: 15px; left:5px;" title="Atualizar dados" src="http://i.imgur.com/PnvfxVl.png" id="atualizar">
- </td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- </div>
- </div>
- <div id="container_miniplayer">
- <div id="miniplayer">
- <table style="width:220px; position: relative; margin: auto;">
- <tr>
- <td>
- <p class="p_radio" style="position: relative; top: -10px; padding-left: 10px; "><img style="position: relative; top:2px;" title="Dj" src="http://i.imgur.com/wdDay4M.png"> <font title="Locutor" style="position: relative; left:4px; top:-2px; font-size: 18px; font-family: calibri;"><MARQUEE class="dj" HEIGHT=30 WIDTH=130 DIRECTION=LEFT SCROLLAMOUNT=5><font style="position: relative; top:12px;"><?php echo $locutor." Musica: ".$musica ?> - DJ</font></MARQUEE></font></p>
- </td>
- <td>
- <img style="position: relative; top: -21px; left: 15px;" src="http://i.imgur.com/pmp66wJ.png" id="arrastarplayer">
- </td>
- <td>
- <a id="maxmizar" style="position: relative; margin-right: 25px; top:-23px;" data-element="#area_player"></a>
- </td>
- </tr>
- </table>
- </div>
- </div>
- </div>
- </form>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement