This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// ----- dd-wrt DDNS settings: ----- | |
// DDNS Service: Custom | |
// DYNDNS Server: <your web server domain> (e.g. www.example.com) | |
// User Name: <anything> | |
// Password: <anything> | |
// Host Name: <your DDNS hostname> (e.g. home.example.com) | |
// URL: /cloudflare_ddns_updater.php?email=<your cloudflare account email>&apikey=<your cloudflare client api key>&domain=<your domain>&host=<your DDNS hostname> | |
// (e.g.: /[email protected]&apikey=123456789012345678901234567890&domain=example.com&host=home.example.com) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ | |
NSString *urlString = @"http://www.google.com/"; | |
NSURL *url = [NSURL URLWithString:urlString]; | |
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url]; | |
[request setHTTPMethod:@"HEAD"]; | |
NSHTTPURLResponse *response; | |
[NSURLConnection sendSynchronousRequest:request returningResponse:&response error:NULL]; | |
if ([response statusCode] == 200) |