<?

/* SCXML-Server 1.0.4 */

/* Shoutcast Server Info - XML version 1.0.4                 */
/* MAD props to Tom Pepper and Tag Loomis for all their help */
/* June 25th 2003 12:49 EST                                  */

require "server-obj.phps";

$serv1 = new SCXML1;
$serv2 = new SCXML2;
$serv3 = new SCXML3;
$serv4 = new SCXML4;

// Configure For Different Servers
$serv1->set_host("ip.address.of.server1");
$serv2->set_host("ip.address.of.server2");
$serv3->set_host("ip.address.of.server3");
$serv4->set_host("ip.address.of.server4");

$serv1->set_port(port1);
$serv2->set_port(port2);
$serv3->set_port(port3);
$serv4->set_port(prot4);

$serv1->set_password("password1");
$serv2->set_password("password2");
$serv3->set_password("password3");
$serv4->set_password("password4");


// Error Check For Server Being Down
if (!$serv1->retrieveXML()) DIE ("Cannot fetch Server 1 XML, exiting\n");
if (!
$serv2->retrieveXML()) DIE ("Cannot fetch Server 2 XML, exiting\n");
if (!
$serv3->retrieveXML()) DIE ("Cannot fetch Server 3 XML, exiting\n");
if (!
$serv4->retrieveXML()) DIE ("Cannot fetch Server 4 XML, exiting\n");


// Values To Be Parsed From The Server XML
$cur_listen1=$serv1->fetchMatchingTag("CURRENTLISTENERS");
if (
$cur_listen1 == "") {
   
$cur_listen1 0;
 }
$cur_listen2=$serv2->fetchMatchingTag("CURRENTLISTENERS");
if (
$cur_listen2 == "") {
   
$cur_listen2 0;
 }
$cur_listen3=$serv3->fetchMatchingTag("CURRENTLISTENERS");
if (
$cur_listen3 == "") {
   
$cur_listen3 0;
 }
$cur_listen4=$serv4->fetchMatchingTag("CURRENTLISTENERS");
if (
$cur_listen4 == "") {
   
$cur_listen4 0;
 }

$peak_listen1=$serv1->fetchMatchingTag("PEAKLISTENERS");
$peak_listen2=$serv2->fetchMatchingTag("PEAKLISTENERS");
$peak_listen3=$serv3->fetchMatchingTag("PEAKLISTENERS");
$peak_listen4=$serv4->fetchMatchingTag("PEAKLISTENERS");

$max_listen1=$serv1->fetchMatchingTag("MAXLISTENERS");
$max_listen2=$serv2->fetchMatchingTag("MAXLISTENERS");
$max_listen3=$serv3->fetchMatchingTag("MAXLISTENERS");
$max_listen4=$serv4->fetchMatchingTag("MAXLISTENERS");

$title1=$serv1->fetchMatchingTag("SERVERTITLE");
$title2=$serv2->fetchMatchingTag("SERVERTITLE");
$title3=$serv3->fetchMatchingTag("SERVERTITLE");
$title4=$serv4->fetchMatchingTag("SERVERTITLE");

$avg_time1=$serv1->fetchMatchingTag("AVERAGETIME");
$avg_time2=$serv2->fetchMatchingTag("AVERAGETIME");
$avg_time3=$serv3->fetchMatchingTag("AVERAGETIME");
$avg_time4=$serv4->fetchMatchingTag("AVERAGETIME");

$song_title1=$serv1->fetchMatchingTag("SONGTITLE");
$song_title2=$serv2->fetchMatchingTag("SONGTITLE");
$song_title3=$serv3->fetchMatchingTag("SONGTITLE");
$song_title4=$serv4->fetchMatchingTag("SONGTITLE");

$con_hostname1=$serv1->fetchMatchingArray("HOSTNAME");
$con_hostname2=$serv2->fetchMatchingArray("HOSTNAME");
$con_hostname3=$serv3->fetchMatchingArray("HOSTNAME");
$con_hostname4=$serv4->fetchMatchingArray("HOSTNAME");

$con_listen1=$serv1->fetchMatchingArray("CONNECTTIME");
$con_listen2=$serv2->fetchMatchingArray("CONNECTTIME");
$con_listen3=$serv3->fetchMatchingArray("CONNECTTIME");
$con_listen4=$serv4->fetchMatchingArray("CONNECTTIME");

$con_uid1=$serv1->fetchMatchingArray("UID");
$con_uid2=$serv2->fetchMatchingArray("UID");
$con_uid3=$serv3->fetchMatchingArray("UID");
$con_uid4=$serv4->fetchMatchingArray("UID");

$con_useragent1=$serv1->fetchMatchingArray("USERAGENT");
$con_useragent2=$serv2->fetchMatchingArray("USERAGENT");
$con_useragent3=$serv3->fetchMatchingArray("USERAGENT");
$con_useragent4=$serv4->fetchMatchingArray("USERAGENT");


  echo 
"<html>\n";
  echo 
"<META HTTP-EQUIV=\"REFRESH\" CONTENT=\"60\">\n";
  echo 
"<head>\n";
  echo 
" <title>Server Status Page</title>\n";
  echo 
"</head>\n";
  echo 
"\n";
  echo 
"<body bgcolor=\"#ffffef\" text=\"#ffffef\" link=\"#bd6b29\" alink=\"#ffffff\" vlink=\"#bd6b29\">\n";
  echo 
"<center>\n";

// TOP TABLE
  
echo " <table width=\"600\" border=\"0\" cellspacing=\"3\" cellpadding=\"2\">\n";
  echo 
"  <tr>\n";
  echo 
"  <td>\n";
  echo 
"       <font face=\"Arial, Helvetica\" size=\"2\">\n";
  echo 
"          <center>\n";
  echo 
"            <b><font size=\"+1\" color=\"#bd6b29\">Server Status Page</font></b>\n";
  echo 
"          </center>\n";
  echo 
"       </font>\n";
  echo 
"  </td>\n";
  echo 
"  </tr>\n";
  echo 
" </table>\n";
// CLOSE TOP TABLE

  
echo "    <br>\n";

// SERVER 1 TABLE
  
echo " <table width=\"600\" border=\"0\" cellspacing=\"3\" cellpadding=\"2\">\n";
  echo 
" <hr>\n";
  echo 
"  <tr>\n";
  echo 
"  <td>\n";
  echo 
"    <table width=\"100%\" border=\"0\" cellspacing=\"3\" cellpadding=\"2\">\n";
  echo 
"      <tr>\n";
  echo 
"        <td bgcolor=\"#bd6b29\">\n";
  echo 
"          <center>\n";
  echo 
"          <b><font face=\"Arial, Helvetica\" size=\"2\">Server 1 - $title1</font></b>\n";
  echo 
"          </center>\n";
  echo 
"        </td>\n";
  echo 
"      </tr>\n";
  echo 
"      <tr>\n";
  echo 
"        <td bgcolor=\"#096b29\">\n";
  echo 
"          <center>\n";
  echo 
"          <font face=\"Arial, Helvetica\" size=\"2\">There are currently $cur_listen1 out of $max_listen1 people wasting bandwidth.</font>\n";
  echo 
"          </center>\n";
  echo 
"        </td>\n";
  echo 
"      </tr>\n";
  echo 
"      <tr>\n";
  echo 
"        <td bgcolor=\"#096b29\">\n";
  echo 
"          <center>\n";
  echo 
"          <font face=\"Arial, Helvetica\" size=\"2\">Current Song: $song_title1</font>\n";
  echo 
"          </center>\n";
  echo 
"        </td>\n";
  echo 
"      </tr>\n";
  echo 
"      </table>\n";
  echo 
"      <table width=\"100%\" border=\"0\" cellspacing=\"3\" cellpadding=\"2\">\n";
  echo 
"        <tr>\n";
  echo 
"          <td width=\"50%\" bgcolor=\"#096b29\">\n";
  echo 
"            <center>\n";
  echo 
"            <font face=\"Arial, Helvetica\" size=\"2\">Average Listener Time: $avg_time1</font>\n";
  echo 
"            </center>\n";
  echo 
"          </td>\n";
  echo 
"          <td width=\"50%\" colspan=\"2\" bgcolor=\"#096b29\">\n";
  echo 
"            <center>\n";
  echo 
"            <font face=\"Arial, Helvetica\" size=\"2\" >Peak # Of Listeners: $peak_listen1</font>\n";
  echo 
"            </center>\n";
  echo 
"          </td>\n";
  echo 
"        </tr>\n";
  echo 
"      </table>\n";
  echo 
"      <table width=\"100%\" border=\"3\" cellspacing=\"3\" cellpadding=\"3\">\n";
  echo 
"        <tr>\n";
  echo 
"          <td width=\"100%\" bgcolor=\"#bd6b29\">\n";
  echo 
"          </td>\n";
  echo 
"        </tr>\n";
  echo 
"      </table>\n";
  echo 
"      <table width=\"100%\" border=\"0\" cellspacing=\"3\" cellpadding=\"2\">\n";
  echo 
"        <tr>\n";
  echo 
"          <td width=\"10%\" bgcolor=\"#bd6b29\">\n";
  echo 
"            <b><font face=\"Arial, Helvetica\" size=\"2\">UID</font></b>\n";
  echo 
"          </td>\n";
  echo 
"          <td width=\"55%\" bgcolor=\"#bd6b29\">\n";
  echo 
"            <b><font face=\"Arial, Helvetica\" size=\"2\">Hostname</font></b>\n";
  echo 
"          </td>\n";
  echo 
"          <td width=\"25%\" bgcolor=\"#bd6b29\">\n";
  echo 
"            <b><font face=\"Arial, Helvetica\" size=\"2\">User Agent</font></b>\n";
  echo 
"          </td>\n";
  echo 
"          <td width=\"10%\" bgcolor=\"#bd6b29\">\n";
  echo 
"            <b><font face=\"Arial, Helvetica\" size=\"2\">Time</font></b>\n";
  echo 
"          </td>\n";
  echo 
"        </tr>\n";
  echo 
"      </table>\n";
  echo 
"      <table width=\"100%\" border=\"0\" cellspacing=\"3\" cellpadding=\"2\">\n";
  echo 
"        <tr>\n";
while(list(
$key,$val) = each($con_uid1)) {
  echo 
"          <td width=\"10%\" bgcolor=\"#096b29\">\n";
  echo 
"            <font face=\"Arial, Helvetica\" size=\"2\">$con_uid1[$key]</font>\n";
  echo 
"          </td>\n";
  echo 
"          <td width=\"55%\" bgcolor=\"#096b29\">\n";
  echo 
"            <font face=\"Arial, Helvetica\" size=\"2\"><a href=\"http://www.checkdomain.com/cgi-bin/checkdomain.pl?domain=$con_hostname1[$key]\">$con_hostname1[$key]</a></font>\n";
  echo 
"          </td>\n";
  echo 
"          <td width=\"55%\" bgcolor=\"#096b29\">\n";
  echo 
"            <font face=\"Arial, Helvetica\" size=\"2\">$con_useragent1[$key]</font>\n";
  echo 
"          </td>\n";
  echo 
"          <td width=\"10%\" bgcolor=\"#096b29\">\n";
  echo 
"            <font face=\"Arial, Helvetica\" size=\"2\">$con_listen1[$key]</font>\n";
  echo 
"          </td>\n";
  echo 
"        </tr>\n";
}
  echo 
"      </table>\n";
  echo 
"    </table>\n";
  echo 
"  </tr>";
  echo 
"  </td>";
  echo 
" </table>\n";
// CLOSE SERVER 1 TABLE

  
echo "    <br>\n";

// SERVER 2 TABLE
  
echo " <table width=\"600\" border=\"0\" cellspacing=\"3\" cellpadding=\"2\">\n";
  echo 
" <hr>\n";
  echo 
"  <tr>\n";
  echo 
"  <td>\n";
  echo 
"    <table width=\"100%\" border=\"0\" cellspacing=\"3\" cellpadding=\"2\">\n";
  echo 
"      <tr>\n";
  echo 
"        <td bgcolor=\"#bd6b29\">\n";
  echo 
"          <center>\n";
  echo 
"          <b><font face=\"Arial, Helvetica\" size=\"2\">Server 2 - $title2</font></b>\n";
  echo 
"          </center>\n";
  echo 
"        </td>\n";
  echo 
"      </tr>\n";
  echo 
"      <tr>\n";
  echo 
"        <td bgcolor=\"#096b29\">\n";
  echo 
"          <center>\n";
  echo 
"          <font face=\"Arial, Helvetica\" size=\"2\">There are currently $cur_listen2 out of $max_listen2 people wasting bandwidth.</font>\n";
  echo 
"          </center>\n";
  echo 
"        </td>\n";
  echo 
"      </tr>\n";
  echo 
"      <tr>\n";
  echo 
"        <td bgcolor=\"#096b29\">\n";
  echo 
"          <center>\n";
  echo 
"          <font face=\"Arial, Helvetica\" size=\"2\">Current Song: $song_title2</font>\n";
  echo 
"          </center>\n";
  echo 
"        </td>\n";
  echo 
"      </tr>\n";
  echo 
"      <table width=\"100%\" border=\"0\" cellspacing=\"3\" cellpadding=\"2\">\n";
  echo 
"        <tr>\n";
  echo 
"          <td width=\"50%\" bgcolor=\"#096b29\">\n";
  echo 
"            <center>\n";
  echo 
"            <font face=\"Arial, Helvetica\" size=\"2\">Average Listener Time: $avg_time2</font>\n";
  echo 
"            </center>\n";
  echo 
"          </td>\n";
  echo 
"          <td width=\"50%\" colspan=\"2\" bgcolor=\"#096b29\">\n";
  echo 
"            <center>\n";
  echo 
"            <font face=\"Arial, Helvetica\" size=\"2\" >Peak # Of Listeners: $peak_listen2</font>\n";
  echo 
"            </center>\n";
  echo 
"          </td>\n";
  echo 
"        </tr>\n";
  echo 
"      </table>\n";
  echo 
"      <table width=\"100%\" border=\"3\" cellspacing=\"3\" cellpadding=\"3\">\n";
  echo 
"        <tr>\n";
  echo 
"          <td width=\"100%\" bgcolor=\"#bd6b29\">\n";
  echo 
"          </td>\n";
  echo 
"        </tr>\n";
  echo 
"      </table>\n";
  echo 
"      <table width=\"100%\" border=\"0\" cellspacing=\"3\" cellpadding=\"2\">\n";
  echo 
"        <tr>\n";
  echo 
"          <td width=\"10%\" bgcolor=\"#bd6b29\">\n";
  echo 
"            <b><font face=\"Arial, Helvetica\" size=\"2\">UID</font></b>\n";
  echo 
"          </td>\n";
  echo 
"          <td width=\"55%\" bgcolor=\"#bd6b29\">\n";
  echo 
"            <b><font face=\"Arial, Helvetica\" size=\"2\">Hostname</font></b>\n";
  echo 
"          </td>\n";
  echo 
"          <td width=\"25%\" bgcolor=\"#bd6b29\">\n";
  echo 
"            <b><font face=\"Arial, Helvetica\" size=\"2\">User Agent</font></b>\n";
  echo 
"          </td>\n";
  echo 
"          <td width=\"10%\" bgcolor=\"#bd6b29\">\n";
  echo 
"            <b><font face=\"Arial, Helvetica\" size=\"2\">Time</font></b>\n";
  echo 
"          </td>\n";
  echo 
"        </tr>\n";
  echo 
"      </table>\n";
  echo 
"      <table width=\"100%\" border=\"0\" cellspacing=\"3\" cellpadding=\"2\">\n";
  echo 
"        <tr>\n";
while(list(
$key,$val) = each($con_uid2)) {
  echo 
"          <td width=\"10%\" bgcolor=\"#096b29\">\n";
  echo 
"            <font face=\"Arial, Helvetica\" size=\"2\">$con_uid2[$key]</font>\n";
  echo 
"          </td>\n";
  echo 
"          <td width=\"55%\" bgcolor=\"#096b29\">\n";
  echo 
"            <font face=\"Arial, Helvetica\" size=\"2\"><a href=\"http://www.checkdomain.com/cgi-bin/checkdomain.pl?domain=$con_hostname2[$key]\">$con_hostname2[$key]</a></font>\n";
  echo 
"          </td>\n";
  echo 
"          <td width=\"25%\" bgcolor=\"#096b29\">\n";
  echo 
"            <font face=\"Arial, Helvetica\" size=\"2\">$con_useragent2[$key]</font>\n";
  echo 
"          </td>\n";
  echo 
"          <td width=\"10%\" bgcolor=\"#096b29\">\n";
  echo 
"            <font face=\"Arial, Helvetica\" size=\"2\">$con_listen2[$key]</font>\n";
  echo 
"          </td>\n";
  echo 
"        </tr>\n";
}
  echo 
"      </table>\n";
  echo 
"    </table>\n";
  echo 
"  </tr>";
  echo 
"  </td>";
  echo 
" </table>\n";
// CLOSE SERVER 2 TABLE

  
echo "    <br>\n";

// SERVER 3 TABLE
  
echo " <table width=\"600\" border=\"0\" cellspacing=\"3\" cellpadding=\"2\">\n";
  echo 
" <hr>\n";
  echo 
"  <tr>\n";
  echo 
"  <td>\n";
  echo 
"    <table width=\"100%\" border=\"0\" cellspacing=\"3\" cellpadding=\"2\">\n";
  echo 
"      <tr>\n";
  echo 
"        <td bgcolor=\"#bd6b29\">\n";
  echo 
"          <center>\n";
  echo 
"          <b><font face=\"Arial, Helvetica\" size=\"2\">Server 3 - $title3</font></b>\n";
  echo 
"          </center>\n";
  echo 
"        </td>\n";
  echo 
"      </tr>\n";
  echo 
"      <tr>\n";
  echo 
"        <td bgcolor=\"#096b29\">\n";
  echo 
"          <center>\n";
  echo 
"          <font face=\"Arial, Helvetica\" size=\"2\">There are currently $cur_listen3 out of $max_listen3 people wasting bandwidth.</font>\n";
  echo 
"          </center>\n";
  echo 
"        </td>\n";
  echo 
"      </tr>\n";
  echo 
"      <tr>\n";
  echo 
"        <td bgcolor=\"#096b29\">\n";
  echo 
"          <center>\n";
  echo 
"          <font face=\"Arial, Helvetica\" size=\"2\">Current Song: $song_title3</font>\n";
  echo 
"          </center>\n";
  echo 
"        </td>\n";
  echo 
"      </tr>\n";
  echo 
"      <table width=\"100%\" border=\"0\" cellspacing=\"3\" cellpadding=\"2\">\n";
  echo 
"        <tr>\n";
  echo 
"          <td width=\"50%\" bgcolor=\"#096b29\">\n";
  echo 
"            <center>\n";
  echo 
"            <font face=\"Arial, Helvetica\" size=\"2\">Average Listener Time: $avg_time3</font>\n";
  echo 
"            </center>\n";
  echo 
"          </td>\n";
  echo 
"          <td width=\"50%\" colspan=\"2\" bgcolor=\"#096b29\">\n";
  echo 
"            <center>\n";
  echo 
"            <font face=\"Arial, Helvetica\" size=\"2\" >Peak # Of Listeners: $peak_listen3</font>\n";
  echo 
"            </center>\n";
  echo 
"          </td>\n";
  echo 
"        </tr>\n";
  echo 
"      </table>\n";
  echo 
"      <table width=\"100%\" border=\"3\" cellspacing=\"3\" cellpadding=\"3\">\n";
  echo 
"        <tr>\n";
  echo 
"          <td width=\"100%\" bgcolor=\"#bd6b29\">\n";
  echo 
"          </td>\n";
  echo 
"        </tr>\n";
  echo 
"      </table>\n";
  echo 
"      <table width=\"100%\" border=\"0\" cellspacing=\"3\" cellpadding=\"2\">\n";
  echo 
"        <tr>\n";
  echo 
"          <td width=\"10%\" bgcolor=\"#bd6b29\">\n";
  echo 
"            <b><font face=\"Arial, Helvetica\" size=\"2\">UID</font></b>\n";
  echo 
"          </td>\n";
  echo 
"          <td width=\"55%\" bgcolor=\"#bd6b29\">\n";
  echo 
"            <b><font face=\"Arial, Helvetica\" size=\"2\">Hostname</font></b>\n";
  echo 
"          </td>\n";
  echo 
"          <td width=\"25%\" bgcolor=\"#bd6b29\">\n";
  echo 
"            <b><font face=\"Arial, Helvetica\" size=\"2\">User Agent</font></b>\n";
  echo 
"          </td>\n";
  echo 
"          <td width=\"10%\" bgcolor=\"#bd6b29\">\n";
  echo 
"            <b><font face=\"Arial, Helvetica\" size=\"2\">Time</font></b>\n";
  echo 
"          </td>\n";
  echo 
"        </tr>\n";
  echo 
"      </table>\n";
  echo 
"      <table width=\"100%\" border=\"0\" cellspacing=\"3\" cellpadding=\"2\">\n";
  echo 
"        <tr>\n";
while(list(
$key,$val) = each($con_uid3)) {
  echo 
"          <td width=\"10%\" bgcolor=\"#096b29\">\n";
  echo 
"            <font face=\"Arial, Helvetica\" size=\"2\">$con_uid3[$key]</font>\n";
  echo 
"          </td>\n";
  echo 
"          <td width=\"55%\" bgcolor=\"#096b29\">\n";
  echo 
"            <font face=\"Arial, Helvetica\" size=\"2\"><a href=\"http://www.checkdomain.com/cgi-bin/checkdomain.pl?domain=$con_hostname3[$key]\">$con_hostname3[$key]</a></font>\n";
  echo 
"          </td>\n";
  echo 
"          <td width=\"25%\" bgcolor=\"#096b29\">\n";
  echo 
"            <font face=\"Arial, Helvetica\" size=\"2\">$con_useragent3[$key]</font>\n";
  echo 
"          </td>\n";
  echo 
"          <td width=\"10%\" bgcolor=\"#096b29\">\n";
  echo 
"            <font face=\"Arial, Helvetica\" size=\"2\">$con_listen3[$key]</font>\n";
  echo 
"          </td>\n";
  echo 
"        </tr>\n";
}
  echo 
"      </table>\n";
  echo 
"    </table>\n";
  echo 
"  </tr>";
  echo 
"  </td>";
  echo 
" </table>\n";
// CLOSE SERVER 3 TABLE

  
echo "    <br>\n";

// SERVER 4 TABLE
  
echo " <table width=\"600\" border=\"0\" cellspacing=\"3\" cellpadding=\"2\">\n";
  echo 
" <hr>\n";
  echo 
"  <tr>\n";
  echo 
"  <td>\n";
  echo 
"    <table width=\"100%\" border=\"0\" cellspacing=\"3\" cellpadding=\"2\">\n";
  echo 
"      <tr>\n";
  echo 
"        <td bgcolor=\"#bd6b29\">\n";
  echo 
"          <center>\n";
  echo 
"          <b><font face=\"Arial, Helvetica\" size=\"2\">Server 4 - $title4</font></b>\n";
  echo 
"          </center>\n";
  echo 
"        </td>\n";
  echo 
"      </tr>\n";
  echo 
"      <tr>\n";
  echo 
"        <td bgcolor=\"#096b29\">\n";
  echo 
"          <center>\n";
  echo 
"          <font face=\"Arial, Helvetica\" size=\"2\">There are currently $cur_listen4 out of $max_listen4 people wasting bandwidth.</font>\n";
  echo 
"          </center>\n";
  echo 
"        </td>\n";
  echo 
"      </tr>\n";
  echo 
"      <tr>\n";
  echo 
"        <td bgcolor=\"#096b29\">\n";
  echo 
"          <center>\n";
  echo 
"          <font face=\"Arial, Helvetica\" size=\"2\">Current Song: $song_title4</font>\n";
  echo 
"          </center>\n";
  echo 
"        </td>\n";
  echo 
"      </tr>\n";
  echo 
"      <table width=\"100%\" border=\"0\" cellspacing=\"3\" cellpadding=\"2\">\n";
  echo 
"        <tr>\n";
  echo 
"          <td width=\"50%\" bgcolor=\"#096b29\">\n";
  echo 
"            <center>\n";
  echo 
"            <font face=\"Arial, Helvetica\" size=\"2\">Average Listener Time: $avg_time4</font>\n";
  echo 
"            </center>\n";
  echo 
"          </td>\n";
  echo 
"          <td width=\"50%\" colspan=\"2\" bgcolor=\"#096b29\">\n";
  echo 
"            <center>\n";
  echo 
"            <font face=\"Arial, Helvetica\" size=\"2\" >Peak # Of Listeners: $peak_listen4</font>\n";
  echo 
"            </center>\n";
  echo 
"          </td>\n";
  echo 
"        </tr>\n";
  echo 
"      </table>\n";
  echo 
"      <table width=\"100%\" border=\"3\" cellspacing=\"3\" cellpadding=\"3\">\n";
  echo 
"        <tr>\n";
  echo 
"          <td width=\"100%\" bgcolor=\"#bd6b29\">\n";
  echo 
"          </td>\n";
  echo 
"        </tr>\n";
  echo 
"      </table>\n";
  echo 
"      <table width=\"100%\" border=\"0\" cellspacing=\"3\" cellpadding=\"2\">\n";
  echo 
"        <tr>\n";
  echo 
"          <td width=\"10%\" bgcolor=\"#bd6b29\">\n";
  echo 
"            <b><font face=\"Arial, Helvetica\" size=\"2\">UID</font></b>\n";
  echo 
"          </td>\n";
  echo 
"          <td width=\"55%\" bgcolor=\"#bd6b29\">\n";
  echo 
"            <b><font face=\"Arial, Helvetica\" size=\"2\">Hostname</font></b>\n";
  echo 
"          </td>\n";
  echo 
"          <td width=\"25%\" bgcolor=\"#bd6b29\">\n";
  echo 
"            <b><font face=\"Arial, Helvetica\" size=\"2\">User Agent</font></b>\n";
  echo 
"          </td>\n";
  echo 
"          <td width=\"10%\" bgcolor=\"#bd6b29\">\n";
  echo 
"            <b><font face=\"Arial, Helvetica\" size=\"2\">Time</font></b>\n";
  echo 
"          </td>\n";
  echo 
"        </tr>\n";
  echo 
"      </table>\n";
  echo 
"      <table width=\"100%\" border=\"0\" cellspacing=\"3\" cellpadding=\"2\">\n";
  echo 
"        <tr>\n";
while(list(
$key,$val) = each($con_uid4)) {
  echo 
"          <td width=\"10%\" bgcolor=\"#096b29\">\n";
  echo 
"            <font face=\"Arial, Helvetica\" size=\"2\">$con_uid4[$key]</font>\n";
  echo 
"          </td>\n";
  echo 
"          <td width=\"55%\" bgcolor=\"#096b29\">\n";
  echo 
"            <font face=\"Arial, Helvetica\" size=\"2\"><a href=\"http://www.checkdomain.com/cgi-bin/checkdomain.pl?domain=$con_hostname4[$key]\">$con_hostname4[$key]</a></font>\n";
  echo 
"          </td>\n";
  echo 
"          <td width=\"25%\" bgcolor=\"#096b29\">\n";
  echo 
"            <font face=\"Arial, Helvetica\" size=\"2\">$con_useragent4[$key]</font>\n";
  echo 
"          </td>\n";
  echo 
"          <td width=\"10%\" bgcolor=\"#096b29\">\n";
  echo 
"            <font face=\"Arial, Helvetica\" size=\"2\">$con_listen4[$key]</font>\n";
  echo 
"          </td>\n";
  echo 
"        </tr>\n";
}
  echo 
"      </table>\n";
  echo 
"    </table>\n";
  echo 
"  </tr>";
  echo 
"  </td>";
  echo 
" </table>\n";
// CLOSE SERVER 4 TABLE

  
echo "</center>\n";
  echo 
"<br>\n";
  echo 
"<center>\n";
  echo 
"  <a href=\"http://www.shoutcast.com/\" target=\"_blank\"><img src=\"pict/sc-small.gif\" border=\"0\" alt=\"Powered by ShoutCast\"></a>\n";
  echo 
"</center>\n";
  echo 
"</body>\n";
  echo 
"</html>";

?>