shoutcast pls forbidden for iPhone programatically?
- by Nareshkumar
I have been trying to access the pls file data from shoutcast for some testing but the response seems to be forbidden and i am getting 403 as response.
here is the code
NSURL *myurl = [NSURL URLWithString:@"http://yp.shoutcast.com/sbin/tunein-station.pls?id=9944"] ;
//Accept:*/*
NSMutableURLRequest *myrequest = [[NSMutableURLRequest alloc]initWithURL:myurl];
[myrequest setValue:@"*/*" forHTTPHeaderField:@"Accept"];
//NSURL *myurl = [NSURL URLWithString:@"http://www.google.com"];
NSURLConnection *theConnection = [[NSURLConnection alloc]initWithRequest:myrequest delegate:self];
On the response, it was showing a 403 and no data is received. I tried to check the content-type and it was showing audio/x-scpls
Can someone help me solve this issue please?