├── cache ├── Thumbs.db └── default.jpg ├── config.php ├── example.php ├── example_history.php ├── history.php ├── icecast.php └── var_dump.html /cache/Thumbs.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kvaps/icecast-now-playing-script/349bb172d33bd33148a8f93ad56a81a4d412603c/cache/Thumbs.db -------------------------------------------------------------------------------- /cache/default.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kvaps/icecast-now-playing-script/349bb172d33bd33148a8f93ad56a81a4d412603c/cache/default.jpg -------------------------------------------------------------------------------- /config.php: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 |8 | Code by Jude (surftheair@gmail.com) 9 |
10 |11 | 15 |16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /example_history.php: -------------------------------------------------------------------------------- 1 |
Code by Jude (surftheair@gmail.com)
-------------------------------------------------------------------------------- /history.php: -------------------------------------------------------------------------------- 1 | $value){ if(is_array($value)){ $array[$key] = array_decode($value); } else{ $array[$key] = base64_decode($value); } } return $array; } ?> -------------------------------------------------------------------------------- /icecast.php: -------------------------------------------------------------------------------- 1 | 4 | http://jude.im/ 5 | works with Icecast 2.3.2 6 | */ 7 | 8 | require('config.php'); 9 | $stream = getStreamInfo(); 10 | if($stream['info']['status'] == 'OFF AIR'){ 11 | cacheVar($stream); 12 | } 13 | else{ 14 | $last_song = @file_get_contents('last.txt'); 15 | if($last_song != base64_encode($stream['info']['song'])){ 16 | $stream = init($stream); 17 | $stream = getInfo($stream); 18 | file_put_contents('last.txt', base64_encode($stream['info']['song'])); 19 | cacheVar($stream); 20 | if(RECORD_HISTORY == true){ 21 | cacheHistory($stream); 22 | } 23 | } 24 | else{ 25 | $stream = array_decode(json_decode(@file_get_contents('var/info.json'), TRUE)); 26 | } 27 | } 28 | //print_r($stream); 29 | 30 | function obj_to_array($obj){ 31 | $array = (is_object) ? (array)$obj : $obj; 32 | foreach($array as $k=>$v){ 33 | if(is_object($v) OR is_array($v)) 34 | $array[$k] = obj_to_array($v); 35 | } 36 | return $array; 37 | } 38 | 39 | function getStreamInfo(){ 40 | $str = @file_get_contents(SERVER.'/status.xsl?mount='.MOUNT); 41 | if(preg_match_all('/
2 | Array 3 | ( 4 | [info] => Array 5 | ( 6 | [status] => ON AIR 7 | [title] => Radio Swiss Pop 8 | [description] => Die besten Pophits der letzten 40 Jahre 9 | [type] => audio/mpeg 10 | [start] => Tue, 27 Sep 2011 10:22:38 +0200 11 | [bitrate] => 128 12 | [listeners] => 151 13 | [msx_listeners] => 531 14 | [genre] => Pop Music 15 | [stream_url] => http://www.radioswisspop.ch 16 | [artist_song] => Maria McKee - Show Me Heaven 17 | [artist] => Maria McKee 18 | [song] => Show Me Heaven 19 | ) 20 | 21 | [album] => Array 22 | ( 23 | [image_xl] => http://userserve-ak.last.fm/serve/300x300/4878352.jpg 24 | [image_l] => http://userserve-ak.last.fm/serve/174s/4878352.jpg 25 | [image_m] => http://userserve-ak.last.fm/serve/126/4878352.jpg 26 | [image_s] => http://userserve-ak.last.fm/serve/64s/4878352.jpg 27 | [title] => Show Me Heaven 28 | [lastfm_url] => http://www.last.fm/music/Maria+McKee/Show+Me+Heaven 29 | [info] => No information found for this album, try searching for Maria McKee - Show Me Heaven on Google 30 | [summary] => No information found for this album, try searching for Maria McKee - Show Me Heaven on Google 31 | [releasedate] => Unknown 32 | [local_image] => cache/4878352.jpg 33 | ) 34 | 35 | [track] => Array 36 | ( 37 | [info] => No information found for this track, try searching for Maria McKee - Show Me Heaven on Google 38 | [summary] => No information found for this track, try searching for Maria McKee - Show Me Heaven on Google 39 | [download_cn] => http://www.google.cn/music/search?q=Maria+McKee+-+Show+Me+Heaven 40 | [lastfm_url] => http://www.last.fm/music/Maria+McKee/_/Show+Me+Heaven 41 | [buylink] => Array 42 | ( 43 | [physical] => Array 44 | ( 45 | [Amazon] => Array 46 | ( 47 | [link] => http://www.last.fm/affiliate/byid/9/1004275/1/ws.track.buylinks.dd40af1da9977c679287dd2d78f017b4 48 | [icon] => http://cdn.last.fm/favicons/amazon.gif 49 | ) 50 | 51 | [eBay] => Array 52 | ( 53 | [link] => http://www.last.fm/affiliate/byid/9/1004275/90/ws.track.buylinks.dd40af1da9977c679287dd2d78f017b4 54 | [icon] => Array 55 | ( 56 | ) 57 | 58 | ) 59 | 60 | ) 61 | 62 | [download] => Array 63 | ( 64 | [Amazon] => Array 65 | ( 66 | [link] => http://www.last.fm/affiliate/byid/9/1004275/44/ws.track.buylinks.dd40af1da9977c679287dd2d78f017b4 67 | [price] => 0.99 68 | [currency] => USD 69 | [icon] => http://cdn.last.fm/favicons/amazon-mp3-16x16-a.gif 70 | ) 71 | 72 | [7digital] => Array 73 | ( 74 | [link] => http://www.last.fm/affiliate/byid/9/1004275/13/ws.track.buylinks.dd40af1da9977c679287dd2d78f017b4 75 | [price] => 0.77 76 | [currency] => USD 77 | [icon] => http://cdn.last.fm/favicons/7digital.gif 78 | ) 79 | 80 | [iTunes] => Array 81 | ( 82 | [link] => http://www.last.fm/affiliate/byid/9/1004275/24/ws.track.buylinks.dd40af1da9977c679287dd2d78f017b4 83 | [price] => 0.99 84 | [currency] => USD 85 | [icon] => http://cdn.last.fm/favicons/itunes16x16.png 86 | ) 87 | 88 | ) 89 | 90 | ) 91 | 92 | [lyric] => There you go 93 | Flashing fever from your eyes 94 | Hey baby, come over here and shut them tight 95 | I'm not denying 96 | We're flying above it all 97 | Hold my hand, don't let me fall 98 | You've such amazing grace 99 | I've never felt this way... 100 | 101 | (Chorus) 102 | Oh Show me heaven 103 | Cover me 104 | Leave me breathless 105 | Oh Show me heaven please 106 | 107 | Here I go 108 | I'm shaking just like the breeze 109 | Hey baby I need your hand to steady me 110 | I'm not denying 111 | I'm frightened as much as you 112 | Though I'm barely touching you 113 | I've shivers down my spine 114 | And it feels divine 115 | 116 | Rep Chorus 117 | 118 | If you know what it's like 119 | To dream a dream 120 | Baby hold me tight 121 | And let this be oh 122 | 123 | Heaven 124 | Cover me 125 | Leave me breathless 126 | Oh Show me heaven please 127 | 128 | Leave me breathless 129 | Leave me breathless 130 | Cover me 131 | Oh yeah.. 132 | ) 133 | 134 | [artist] => Array 135 | ( 136 | [info] => Maria McKee (born Maria Louise McKee, on August 17, 1964 in Los Angeles, California) is an American singer. 137 | 138 | A solo artist, McKee was a founding member of the cowpunk/country rock band Lone Justice, in 1982, with whom she released two albums. Her band opened for such acts as U2. 139 | 140 | In 1986, she wrote Feargal Sharkey's UK number one hit 'A Good Heart'. 141 | 142 | She released her first solo, self-titled album in 1989. Her song "Show Me Heaven", which appeared on the soundtrack to the film Days of Thunder, was a number one single in the United Kingdom for four weeks in 1990. Later her eerie, country-tinged single, "If Love Is a Red Dress (Hang Me in Rags)" was released on the soundtrack of Pulp Fiction. (1994). 143 | 144 | Her recorded output has varied between the rootsy country-folk of You Gotta Sin To Get Saved (1993) and Peddlin' Dreams (2005), and experimental rock on Life Is Sweet (1996) and High Dive (2003). She even made a foray into early-90s dance music with her "Sweetest Child" single. 145 | 146 | Life Is Sweet was seen at the time as an artistic about-face from her country-rock sound, full of guitar feedback and complex, baroque songwriting. Confounding both fans and critics, it was her last release for seven years and her last for a major label. 147 | 148 | In 2007 she released Late December, an album rooted in classic 60s pop songwriting. 149 | 150 | She is the half-sister of Love guitarist/singer/songwriter Bryan Maclean, with whom she played in a duo as a teenager. In the nineties, she spent time living in Dublin and the East Village. 151 | 152 | User-contributed text is available under the Creative Commons By-SA License and may also be available under the GNU FDL. 153 | [summary] => Maria McKee (born Maria Louise McKee, on August 17, 1964 in Los Angeles, California) is an American singer. A solo artist, McKee was a founding member of the cowpunk/country rock band Lone Justice, in 1982, with whom she released two albums. Her band opened for such acts as U2. In 1986, she wrote Feargal Sharkey's UK number one hit 'A Good Heart'. She released her first solo, self-titled album in 1989. 154 | [lastfm_url] => http://www.last.fm/music/Maria+McKee 155 | [top_albums] => Array 156 | ( 157 | [0] => Array 158 | ( 159 | [title] => Pulp Fiction 160 | [url] => http://www.last.fm/music/Various+Artists/Pulp+Fiction 161 | [image] => Array 162 | ( 163 | [0] => http://userserve-ak.last.fm/serve/34s/40061829.png 164 | [1] => http://userserve-ak.last.fm/serve/64s/40061829.png 165 | [2] => http://userserve-ak.last.fm/serve/126/40061829.png 166 | [3] => http://userserve-ak.last.fm/serve/300x300/40061829.png 167 | ) 168 | 169 | ) 170 | 171 | [1] => Array 172 | ( 173 | [title] => Pulp Fiction 174 | [url] => http://www.last.fm/music/Maria+McKee/Pulp+Fiction 175 | [image] => Array 176 | ( 177 | [0] => http://userserve-ak.last.fm/serve/34s/28741473.jpg 178 | [1] => http://userserve-ak.last.fm/serve/64s/28741473.jpg 179 | [2] => http://userserve-ak.last.fm/serve/126/28741473.jpg 180 | [3] => http://userserve-ak.last.fm/serve/300x300/28741473.jpg 181 | ) 182 | 183 | ) 184 | 185 | [2] => Array 186 | ( 187 | [title] => Show Me Heaven 188 | [url] => http://www.last.fm/music/Maria+McKee/Show+Me+Heaven 189 | [image] => Array 190 | ( 191 | [0] => http://userserve-ak.last.fm/serve/34s/4878352.jpg 192 | [1] => http://userserve-ak.last.fm/serve/64s/4878352.jpg 193 | [2] => http://userserve-ak.last.fm/serve/126/4878352.jpg 194 | [3] => http://userserve-ak.last.fm/serve/300x300/4878352.jpg 195 | ) 196 | 197 | ) 198 | 199 | [3] => Array 200 | ( 201 | [title] => PULP FICTION Collector's Edition 202 | [url] => http://www.last.fm/music/Various+Artists/PULP+FICTION++Collector%27s+Edition 203 | [image] => Array 204 | ( 205 | [0] => http://cdn.last.fm/flatness/catalogue/noimage/2/default_album_medium.png 206 | [1] => http://cdn.last.fm/flatness/catalogue/noimage/2/default_album_medium.png 207 | [2] => http://cdn.last.fm/flatness/catalogue/noimage/2/default_album_medium.png 208 | [3] => http://cdn.last.fm/flatness/catalogue/noimage/2/default_album_medium.png 209 | ) 210 | 211 | ) 212 | 213 | [4] => Array 214 | ( 215 | [title] => Drivetime 216 | [url] => http://www.last.fm/music/Diverse+Artister/Drivetime 217 | [image] => Array 218 | ( 219 | [0] => http://userserve-ak.last.fm/serve/34s/46230711.jpg 220 | [1] => http://userserve-ak.last.fm/serve/64s/46230711.jpg 221 | [2] => http://userserve-ak.last.fm/serve/126/46230711.jpg 222 | [3] => http://userserve-ak.last.fm/serve/300x300/46230711.jpg 223 | ) 224 | 225 | ) 226 | 227 | [5] => Array 228 | ( 229 | [title] => Maria McKee 230 | [url] => http://www.last.fm/music/Maria+McKee/Maria+McKee 231 | [image] => Array 232 | ( 233 | [0] => http://userserve-ak.last.fm/serve/34s/44687677.jpg 234 | [1] => http://userserve-ak.last.fm/serve/64s/44687677.jpg 235 | [2] => http://userserve-ak.last.fm/serve/126/44687677.jpg 236 | [3] => http://userserve-ak.last.fm/serve/300x300/44687677.jpg 237 | ) 238 | 239 | ) 240 | 241 | [6] => Array 242 | ( 243 | [title] => You Gotta Sin To Get Saved 244 | [url] => http://www.last.fm/music/Maria+McKee/You+Gotta+Sin+To+Get+Saved 245 | [image] => Array 246 | ( 247 | [0] => http://userserve-ak.last.fm/serve/34s/52664537.jpg 248 | [1] => http://userserve-ak.last.fm/serve/64s/52664537.jpg 249 | [2] => http://userserve-ak.last.fm/serve/126/52664537.jpg 250 | [3] => http://userserve-ak.last.fm/serve/300x300/52664537.jpg 251 | ) 252 | 253 | ) 254 | 255 | [7] => Array 256 | ( 257 | [title] => 100 Essential Love Songs 258 | [url] => http://www.last.fm/music/Diverse+Artister/100+Essential+Love+Songs 259 | [image] => Array 260 | ( 261 | [0] => http://userserve-ak.last.fm/serve/34s/69327662.jpg 262 | [1] => http://userserve-ak.last.fm/serve/64s/69327662.jpg 263 | [2] => http://userserve-ak.last.fm/serve/126/69327662.jpg 264 | [3] => http://userserve-ak.last.fm/serve/300x300/69327662.jpg 265 | ) 266 | 267 | ) 268 | 269 | [8] => Array 270 | ( 271 | [title] => Life Is Sweet 272 | [url] => http://www.last.fm/music/Maria+McKee/Life+Is+Sweet 273 | [image] => Array 274 | ( 275 | [0] => http://images.amazon.com/images/P/B000000OUN.01.MZZZZZZZ.jpg 276 | [1] => http://images.amazon.com/images/P/B000000OUN.01.MZZZZZZZ.jpg 277 | [2] => http://images.amazon.com/images/P/B000000OUN.01.MZZZZZZZ.jpg 278 | [3] => http://images.amazon.com/images/P/B000000OUN.01.MZZZZZZZ.jpg 279 | ) 280 | 281 | ) 282 | 283 | [9] => Array 284 | ( 285 | [title] => Late December 286 | [url] => http://www.last.fm/music/Maria+McKee/Late+December 287 | [image] => Array 288 | ( 289 | [0] => http://userserve-ak.last.fm/serve/34s/32993011.jpg 290 | [1] => http://userserve-ak.last.fm/serve/64s/32993011.jpg 291 | [2] => http://userserve-ak.last.fm/serve/126/32993011.jpg 292 | [3] => http://userserve-ak.last.fm/serve/300x300/32993011.jpg 293 | ) 294 | 295 | ) 296 | 297 | [10] => Array 298 | ( 299 | [title] => Days of Thunder 300 | [url] => http://www.last.fm/music/Various+Artists/Days+of+Thunder 301 | [image] => Array 302 | ( 303 | [0] => http://images.amazon.com/images/P/B000000OZO.01._SCMZZZZZZZ_.jpg 304 | [1] => http://images.amazon.com/images/P/B000000OZO.01._SCMZZZZZZZ_.jpg 305 | [2] => http://images.amazon.com/images/P/B000000OZO.01._SCMZZZZZZZ_.jpg 306 | [3] => http://images.amazon.com/images/P/B000000OZO.01._SCMZZZZZZZ_.jpg 307 | ) 308 | 309 | ) 310 | ) 311 | 312 | ) 313 | 314 | [fetch_time] => 1317181655 315 | ) 316 |--------------------------------------------------------------------------------