SON Çalan şarkılar

[insert_php]
// user-configurable var: Shoutcast server URL
$shoutcast_url = ‘http://159.253.37.137:9978’;

error_reporting(0);
ini_set(‘user_agent’, ‘Mozilla’);
header(‘Content-type: text/plain; charset=utf-8’);
$html = file_get_contents(rtrim($shoutcast_url, ‘/’).’/played.html’);

$dom = new domDocument;
$dom->loadHTML($html);
$tables = $dom->getElementsByTagName(‘table’);
$rows = $tables->item(2)->getElementsByTagName(‘tr’);

foreach($rows as $row)
{
$cols = $row->getElementsByTagName(‘td’);

if(!strstr($cols->item(0)->nodeValue,’@’))
{
echo $cols->item(0)->nodeValue . ‘: ‘;
echo $cols->item(1)->nodeValue;

if($cols->item(2)->nodeValue)
echo ‘*’.$cols->item(2)->nodeValue.’*’;

echo “\n”;
}
}
[/insert_php]