Exemplo n.º 1
0
<?php

error_reporting('E_ERROR');
include "sinusbot.class.php";
include "config.php";
$sinusbot = new SinusBot($ipport);
$sinusbot->login($user, $passwd);
$sinusbot->selectInstance($inst);
$token = $sinusbot->getWebStreamToken($inst);
?>
<html>
<head>
<link rel="stylesheet" type="text/css" href="css/design.css">
<title>SinusBot-Radio@<?php 
echo $yourname;
?>
</title>

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>

<script type="text/javascript">
function loadSong() {
		var xhttp = new XMLHttpRequest();
		xhttp.onreadystatechange = function() {
			if (xhttp.readyState == 4 && xhttp.status == 200) {
				document.getElementById("getSong").innerHTML = "Song: " + xhttp.responseText;
			}
		};
		xhttp.open("GET", "getSong.php", true);
		xhttp.send();
	}	
Exemplo n.º 2
0
<?php

error_reporting('E_ERROR');
include "sinusbot.class.php";
include "config.php";
$sinusbot = new SinusBot($ipport);
$sinusbot->login($user, $passwd);
$status = $sinusbot->getStatus($inst);
$track = $status["currentTrack"]["type"] == "url" ? $status["currentTrack"]["tempTitle"] : $status["currentTrack"]["title"];
$artist = $status["currentTrack"]["tempArtist"];
$name = $track;
$track = preg_replace('^ ^', '+', $track);
if (!empty($artist)) {
    echo "<font color='black' style='size: 16px !important;'>  Search: <a href='https://www.google.de/search?client=opera&q=" . $track . "+-+" . $artist . "&sourceid=opera&ie=UTF-8&oe=UTF-8' target='_new'><img src='http://images.dailytech.com/nimage/G_is_For_Google_New_Logo_Thumb.png' width='16px' height='16px' alt='Google Search'></a> </font>";
} else {
    echo "<font color='black' style='size: 16px !important;'>  Search: <a href='https://www.google.de/search?client=opera&q=" . $track . "&sourceid=opera&ie=UTF-8&oe=UTF-8' target='_new'><img src='http://images.dailytech.com/nimage/G_is_For_Google_New_Logo_Thumb.png' width='16px' height='16px' alt='Google Search'></a></font>";
}
Exemplo n.º 3
0
<?php

error_reporting('E_ERROR');
include "sinusbot.class.php";
include "config.php";
$sinusbot = new SinusBot($ipport);
$sinusbot->login($user, $passwd);
$status = $sinusbot->getStatus($inst);
$thumbnail = $status["currentTrack"]["thumbnail"];
$url = $sinusbot->getThumbnail($thumbnail);
$url = preg_replace("^http\\:\\/\\/127.0.0.1:8087\\/^", $ipport, $url);
if ($url != $ipport . "/cache/") {
    echo "<img src='" . $url . "' width='300' height='300' alt='Song-Image'>";
} else {
    echo "<img src='http://file1.npage.de/005588/15/bilder/homer02.gif' width='300' height='300' alt='Song-Image'>";
}