TheGreatTK
08-25-2008, 04:03 AM
I've got the following tiny PHP script to grab some information from an Icecast server's information page. After some mucking around, i've found that you can't just paste PHP code into the custom bbcode "replacement" box and expect it to work.
I'd like anybody on the forum to be able to use this, inserting real time info into their posts (especially our DJ's) about the current status of our radio station.
Is it possible to accomplish this, or is there another way that I should be going?
<?php+
//+IceCast+Stream+Name+and+Song+Name+Grabber
//+Created+by+BattleHymnZ
//+http://digiclipse.org
$cheese+=+file_get_contents("http://digiclipse.org:8000");
$ding+=+explode("<td>Current+Song /td><td+class=\"streamdata\">",+$cheese);
$sping+=+explode("<td>Stream+Title /td><td+class=\"streamdata\">",+$ding[0]);
$title+=+explode("</td></tr><tr>",+$sping[1]);
$song+=+explode("</td></tr></table>",+$ding[1]);
echo+$title[0];
echo+"<br>";
echo+$song[0];
?>
I'd like anybody on the forum to be able to use this, inserting real time info into their posts (especially our DJ's) about the current status of our radio station.
Is it possible to accomplish this, or is there another way that I should be going?
<?php+
//+IceCast+Stream+Name+and+Song+Name+Grabber
//+Created+by+BattleHymnZ
//+http://digiclipse.org
$cheese+=+file_get_contents("http://digiclipse.org:8000");
$ding+=+explode("<td>Current+Song /td><td+class=\"streamdata\">",+$cheese);
$sping+=+explode("<td>Stream+Title /td><td+class=\"streamdata\">",+$ding[0]);
$title+=+explode("</td></tr><tr>",+$sping[1]);
$song+=+explode("</td></tr></table>",+$ding[1]);
echo+$title[0];
echo+"<br>";
echo+$song[0];
?>