I’m trying to get source code of this page (http://www.sanmarinocard.sm) but dataWithContentsOfURL doesn’t retrieves data.
NSURL *url = [NSURL URLWithString:@"http://www.sanmarinocard.sm"];
NSData *responseData = [NSData dataWithContentsOfURL:url];
NSString *result = [[NSString alloc] initWithData:responseData encoding:NSASCIIStringEncoding];
Until a few days ago everything worked fine, but since yesterday no results.
Can you help me? Thank you.
I discovered that my application is blocked from the site by filtering the user-agent.
I changed the value and now it works perfectly.
I modified the code like this:
Thank you!