<?php
$server_title = "***.***.***.***";
$port_title = "80";
$fp_title = @
fsockopen($server_title, $port_title, $errno, $errstr, 30);
if ($fp_title) {
fputs($fp_title, "GET /7.html HTTP/1.0\r\nUser-Agent: XML Getter (Mozilla Compatible)\r\n\r\n");
while(!
feof($fp_title))
$page_title .=
fgets($fp_title, 1000);
fclose($fp_title);
$page_title =
ereg_replace(".*<body>", "", $page_title);
$page_title =
ereg_replace("</body>.*", ",", $page_title);
$numbers_title =
explode(",", $page_title);
$shoutcast_currentlisteners_title = $numbers_title[0];
$connected_title = $numbers_title[1];
if($connected_title == 1) {
$radio_status_title = 1;
$wordconnected_title = "yes";
}
else
$wordconnected_title = "no";
$shoutcast_cursong_title = $numbers_title[6];
}
include("pkinc/etc/sql.php");
mysql_connect(pkSQLHOST,pkSQLUSER,pkSQLPASS) or
die ("Kann keine Verbindung zum MySQL-Server aufbauen!");
mysql_select_db(pkSQLDATABASE) or
die ("Es existiert keine Datenbank mit dem Namen ".$data."");
$time=
time();
$sql =
mysql_query("SELECT * FROM `djpanel_sendeplan` WHERE d='".
str_pad(
date("j"), 2, '0', STR_PAD_LEFT)."' AND m='".
str_pad(
date("n"), 2, '0', STR_PAD_LEFT)."' AND y='".
date("Y")."' AND `beginn`<='$time' AND `ende`>='$time' LIMIT 1;");
while($sendeplan =
mysql_fetch_array($sql))
{
$akt_showname = $sendeplan[showname];
$akt_musikrichtung = $sendeplan[musikrichtung];
}
$sql_trackliste =
mysql_query("SELECT * FROM `djpanel_trackliste` order by `datum` DESC LIMIT 1;");
while($result =
mysql_fetch_array($sql_trackliste))
{
$akt_interpret = $result[interpret];
$akt_titel = $result[titel];
}
$sql_user =
mysql_query("SELECT * FROM `pk__user` WHERE user_id='".$sendeplan["djid"]."' LIMIT 1;");
while($sendeplan_user =
mysql_fetch_array($sql_user))
{
$user_nick = $sendeplan_user[user_nick];
}
$current_onair_song = "<u>Now OnAir:</u> $user_nick mit $akt_showname ::: $akt_musikrichtung
<br><u>Aktueller Titel:</u> $akt_interpret - $akt_titel";
if(
mysql_num_rows($sql)==0)
{
$current_onair_song = "<b><u>Now OnAir:</u> </b> Playlist mit ClubNature.FM";
}
?>