I only know that the ShoutCast function allows you to stream a list of radio stations.
But not knowing how to use this in an iphone application.
Now I just look at his website http://www.shoutcast.com/ becaues I have not found a lot of all this from googling execpt for my website
Any tutorials would be helpful.
I get an answer like,
<?xml version="1.0" encoding="UTF-8"?> <stationlist> <tunein base="/sbin/tunein-station.pls" /> <station name="PJ Nicky SuperRequest - a SHOUTcast.com member station" mt="audio/mpeg" id="172748" br="64" genre="Various" ct="(Ost. ) -" lc="9946" /> <station name=" TOP 100 ReaLCasT - a SHOUTcast.com member station" mt="audio/mpeg" id="242423" br="128" genre="" ct="- Be My Baby" lc="7485" /> <station name="Alex Jones - Infowars.com - a SHOUTcast.com member station" mt="audio/mpeg" id="1026951" br="32" genre="Talk News Political" ct="Sunday Show Replay - Hr 2 (PrisonPlanet.tv)" lc="4216" /> <station name=" . - a SHOUTcast.com member station" mt="audio/mpeg" id="119368" br="128" genre="" ct="[db]" lc="3453" /> <station name="Auto PJ. RequestRadio - a SHOUTcast.com member station" mt="audio/mpeg" id="30375" br="128" genre="" ct="- The Star 7" lc="2453" /> </stationlist>
Successfully analyze this and get /sbin/tunein-station.pls
Now how do i get
NSString *data = [[NSString alloc]initWithContentsOfURL:[NSURL URLWithString:"http://yp.shoutcast.com/sbin/tunein-station.pls?id=21585&play_status=1"]];
since I only get /sbin/tunein-station.pls
NSString *strEscapedValue = (__bridge_transfer NSString * )CFURLCreateStringByAddingPercentEscapes(nil, (__bridge CFStringRef)data, NULL, NULL, kCFStringEncodingUTF8); NSLog(@"escaped value : %@",strEscapedValue);
strEscapedValue gives (null)
NSURL *url = [NSURL URLWithString:strEscapedValue]; streamer = [[AudioStreamer alloc] initWithURL:url];
source share