PHP code for IceCast stats for websites
  • Hey guys.

    It took me all day to find this script, which is redicoulus since IceCast has been around for ages.

    So ill post it here also, a PHP script to pull info from your IceCast xml file to your website.

    If your website gets stuck and unresponsive then your webhost is blocking port 8000, ask them to remove the block.


    Post edited by Guytrance at 2012-08-16 05:52:23
  • 3 Comments sorted by
  • I took a quick look at the script, nice attempt at tackling this :)

    Official support for icecast stats is on our future roadmap, and we hope to have this feature soon.
    Airtime Pro Hosting: http://airtime.pro
  • Hey Martin.

    Glad to know Airtime will support this, it is a major feature to have :)

    There are some problems in the code though..if i have any song that has the "&" symbol in it..it immediately becomes "&amp"..which is weird. (example: W&W - name of song becomes W&ampW - name of song)

    And of course this script do not refresh :(
    Post edited by Guytrance at 2012-08-17 08:57:13
  • Now if one of the PHP wizards here can tell me how to CSS this script ill be happy :)

    EDIT:
    echo "<p id=example>".htmlspecialchars($radio_info['now_playing']['artist'] . ' - ' . $radio_info['now_playing']['track'])."</p>";
    echo "<p id=example>".htmlspecialchars($radio_info['listeners'])."</p>";

    Then add CSS rule to id
    Post edited by Guytrance at 2012-08-16 11:02:38