View Single Post
Old 3rd September 2015, 09:30   #6
Unknown Artist
Junior Member
 
Unknown Artist's Avatar
 
Join Date: Aug 2014
Posts: 27
You don't need anything crazy in PHP, actually you can do this just as easily in javascript, Scrape the /stats or /7.html (both usually public)

You might in php start like this:
<?php
$url = 'http://www.myradiostation.com/stats';
$output = file_get_contents($url);
echo $output;
//output is xml use php's xml parser
?>

or if you use ajax (jQuery or NodeJS or EmberJS or AngularJS) get the stats page as json and poll every once in a while~
.get('http://myradiostation.com/stats?json=1', callback(data)){};

Or you could use:
https://github.com/Wavestreaming/jquery-shoutcast

As for requests you'll have to script something to handle that yourself, unless you're using something like Sam Broadcaster.

What I do with SHOUTcast otherwise on TuneIn
Unknown Artist is offline   Reply With Quote