Why isn't -stringWithContentsOfURL returning my php echo?
My application is accessing a simple php file on my server that makes a simple echo "YES"; for testing purposes. I am trying to get the echo content into an NSString object as shown below, but my string ALWAYS returns (null). What's wrong?
NSString *theString = [NSString stringWithContentsOfURL:aURLThatEchos];
NSLog(@"Value is: %@", theString);
//Outputs: Value is: (null)
+2
source to share
2 answers