Hallo zusammen ichh abe folgendes Problem ich habe fuer php fusion v7 eine infusion nach Anleitung eingebaut.
Nach Panel aktivierung kommen jedoch folgende fehlermeldungen
Notice: Undefined index: history in C:\Inetpub\vhosts\fly-wow.de\httpdocs\infusions\letztesongs_panel\letztesongs_panel.php on line 28
+++++++++++++++++++++++++++++++++++++++++++++++++++++++
Notice: Undefined index: listener in C:\Inetpub\vhosts\fly-wow.de\httpdocs\infusions\letztesongs_panel\letztesongs_panel.php on line 35
als php code nutze ich folgenden
<?php
/*-------------------------------------------------------+
| PHP-Fusion Content Management System
| Copyright © 2002 - 2008 Nick Jones
| http://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Letzte Songs Panel for PHP-Fusion v7
| Author: Christian Krause (ckoneman04)
| Homepage: http://www.djchrissi.de.ms
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
opensidex("History","on");
// ---------------------------------------------------
// HIER DIE SERVERDATEN EINGEBEN
$scast_host = '****************'; // SHOUTCAST HOST IP
$scast_port = '8000'; // SHOOUTCAST PORT
$scast_pass = '**************'; // SHOUTCAST ADMIN PASSWORT
// ---------------------------------------------------
if ($_REQUEST['history']) {
$show_sc_songhistory = 1;
}
else {
$show_sc_songhistory = 1;
}
if ($_REQUEST['listener']) {
$show_sc_listeners = 1;
}
else {
$show_sc_listeners = 1;
}
if($fp = @fsockopen($scast_host, $scast_port, $errno, $errstr, 30)) {
if(fputs($fp, "GET /admin.cgi?pass=".$scast_pass."&mode=viewxml HTTP/1.0\r\nUser-Agent: XML Getter (Mozilla Compatible)\r\n\r\n")) {
$xmldata = "";
while(!feof($fp)) $xmldata .= fgets($fp, 1000);
$xmldata = explode("\r\n", $xmldata);
$xmldata = $xmldata[3];
}
}
function get_item($name, $source) {
preg_match('#<'.$name.'>(.*?)</'.$name.'>#', $source, $matches);
return $matches[1];
}
function get_items($name, $source) {
preg_match_all('#<'.$name.'>(.*?)</'.$name.'>#', $source, $matches);
return $matches[1];
}
$sc_stream_status = get_item("STREAMSTATUS", $xmldata);
if($sc_stream_status) {
$sc_stream_bitrate = get_item("BITRATE", $xmldata);
$sc_listeners_cur = get_item("CURRENTLISTENERS", $xmldata);
$sc_listeners_peak = get_item("PEAKLISTENERS", $xmldata);
$sc_listeners_max = get_item("MAXLISTENERS", $xmldata);
$sc_server_title = get_item("SERVERTITLE", $xmldata);
$sc_server_url = get_item("SERVERURL", $xmldata);
$sc_server_genre = get_item("SERVERGENRE", $xmldata);
$sc_server_version = get_item("VERSION", $xmldata);
$sc_current_song = get_item("SONGTITLE", $xmldata);
$sc_irc = get_item("IRC", $xmldata);
$sc_icq = get_item("ICQ", $xmldata);
$sc_aim = get_item("AIM", $xmldata);
}
if(!($sc_stream_bitrate)) {
echo " Sorry, aber Server ist offline!" . "\n";
}
else {
if ($show_sc_songhistory) {
echo "\n" . " <center><h3>Songhistory</h3></center>" . "\n";
echo " <center><table border=0></center>" . "\n";
$scast_songs = get_items("SONG", $xmldata);
$count = 0;
for($i=0; $i<count($scast_songs); $i++)
{
$sc_song_playtime = strftime("%H:%M", get_item("PLAYEDAT", $scast_songs[$i]));
$sc_song_title = get_item("TITLE", $scast_songs[$i]);
echo " <tr><td>$sc_song_playtime</td><td>$sc_song_title</td></tr>" . "\n";
}
echo " </table>" . "\n";
} else {
$sc_songhistory = "";
}
if ($show_sc_listeners) {
echo "\n" . " <h3>Zuhörer</h3>" . "\n";
echo " <table border=1>" . "\n";
echo " <tr><th>No.</th><th>Hostname</th><th>Useragent</th><th>Connecttime</th></tr>" . "\n";
$scast_listeners = get_items("LISTENER", $xmldata);
$count = 0;
for($i=0; $i<count($scast_listeners); $i++)
{
$sc_no = $i+1;
$sc_hostname = get_item("HOSTNAME", $scast_listeners[$i]);
$sc_useragent = get_item("USERAGENT", $scast_listeners[$i]);
$sc_connecttime = gmstrftime("%H:%M:%S", get_item("CONNECTTIME", $scast_listeners[$i]));
echo " <tr><td>$sc_no</td><td>$sc_hostname</td><td>$sc_useragent</td><td>$sc_connecttime</td></tr>" . "\n";
}
echo " </table>" . "\n";
}
else {
$sc_listeners = "";
}
}
closesidex();
?>
Alles anzeigen
Ich hoffe ihr koennt mir ssagen was ich falsch gemacht habe ?
Vielen dank schon im vorraus für eure Mühen
sichtbar auf http://www.fly-wow.de
in linker navi leiste