shoutcast pls forbidden for iPhone programatically?
Posted
by Nareshkumar
on Stack Overflow
See other posts from Stack Overflow
or by Nareshkumar
Published on 2010-05-19T13:11:35Z
Indexed on
2010/05/19
15:00 UTC
Read the original article
Hit count: 325
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?
© Stack Overflow or respective owner