Witam,
Potrzebuje pomocy w przerobieniu skryptu tych statystyk shoutcast v1 tak aby obsługiwały jeszcze shoutcast v2.
Próbowałem paroma metodami ale jeszcze tak nie obeznany jestem w tym dlatego występuje z prośbą o pomoc.

Kod
<?php
$f="config.php";
if(file_exists($f)){include($f);}else{exit('Strona lub serwer ma problem z załadowaniem wymaganych plików, przepraszamy za niedogodności.');}
$odswiez="30";
$timeout="1";
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<?php
if($refresh!="0"){echo"<meta http-equiv=\"refresh\" content=\"$odswiez\">\n";}
echo "<title>$title</title>\n";
?>
<style type="text/css">
<!--
body{margin:0px;padding:0px;font-family:Arial;font-size:11px;text-decoration:none;}
#staty{width:500px; height:155px; background:url(images/statystyki_sc.png); margin:0px; padding:0px; border:0px;}
#prezenter{position:absolute;width:333px;padding:0px;font:bold 15px arial;height:auto;border:0px;color:#000000;margin-left:90px;margin-top:45px;display:block;font-weight:normal;}
#audycja{position:absolute;width:333px;padding:0px;font:bold 15px arial;height:auto;border:0px;color:#000000;margin-left:90px;margin-top:80px;display:block;font-weight:normal;}
#sluchacze{position:absolute;width:50px;padding:0px;font:bold 15px arial;height:auto;border:0px;color:#000000;margin-left:215px;margin-top:115px;display:block;font-weight:bold;}
-->
</style>
</head>
<body>
<?php

    $fp=fsockopen($host,$port,$errno,$errstr,$timeout);
    if(!$fp)
        {
        $prezenter="Serwer wyłączony";
        $audycja="Serwer wyłączony";
        $sluchaczy="0";
        }
    else
        {
        fputs($fp,"GET /index.html HTTP/1.0\r\nUser-Agent: XML Getter (Mozilla Compatible)\r\n\r\n");
        while (!feof($fp))
            {
            $info=strip_tags(fgets($fp));
            }
        $info=substr($info,strpos($info,'Server Status:'),strlen($info));
        $info=substr($info,0,strpos($info,'Written by Ste'));

        $prezenter=substr($info,strpos($info,'Stream Genre: '),strpos($info,'Stream URL: ')-strpos($info,'Stream Genre: '));
        $prezenter=str_replace('Stream Genre: ', "", $prezenter);
        
        $audycja=substr($info,strpos($info,'Stream Title: '),strpos($info,'Content Type: ')-strpos($info,'Stream Title: '));
        $audycja=str_replace('Stream Title: ', "", $audycja);
        
        $sluchaczy=substr($info,strpos($info,'kbps with '),strpos($info,' of ')-strpos($info,'kbps with '));
        $sluchaczy=str_replace('kbps with ', "", $sluchaczy);
        }
    fclose($fp);

echo("    
<div id=staty>
<div id=prezenter><marquee truespeed=truespeed scrollamount=1 scrolldelay=30>".$prezenter."</marquee></div>
<div id=audycja><marquee truespeed=truespeed scrollamount=1 scrolldelay=30>".$audycja."</marquee></div>
<div id=sluchacze><center>".$sluchaczy."</center></div>
");
?>
</body></html>


Z góry dziękuje smile.gif

Do Zamknięcia.