Advertisement
Guest User

Untitled

a guest
Mar 16th, 2016
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. NSString *stringUrl = [NSString stringWithFormat:@"http://xxxxxxxxx/login.php?Username=%@&Password=%@",YouruserName, Yourpassword];
  2.  
  3. NSURL *url = [NSURL URLWithString:stringUrl];
  4. NSURLRequest *request = [NSURLRequest requestWithURL:url];
  5. [NSURLConnection sendAsynchronousRequest:request
  6. queue:[NSOperationQueue mainQueue]
  7. completionHandler:^(NSURLResponse *response,
  8. NSData *data, NSError *connectionError)
  9. {
  10. if (data.length > 0 && connectionError == nil)
  11. {
  12. NSDictionary *dicYourResponse = [NSJSONSerialization JSONObjectWithData:data options:0 error:NULL];
  13. }
  14. }];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement