summaryrefslogtreecommitdiff
path: root/it_url.class
diff options
context:
space:
mode:
authorNathan Gass2011-09-27 17:16:30 +0000
committerNathan Gass2011-09-27 17:16:30 +0000
commitb881c0cf629c99ec7cf3067164523036e9dcdfb4 (patch)
treef6a90a50e58575d2e1bf8308d08e0ab8e258d28e /it_url.class
parenta937111319299a5af1390496329410d89fcb6ef8 (diff)
downloaditools-b881c0cf629c99ec7cf3067164523036e9dcdfb4.tar.gz
itools-b881c0cf629c99ec7cf3067164523036e9dcdfb4.tar.bz2
itools-b881c0cf629c99ec7cf3067164523036e9dcdfb4.zip
fall back on get_multi for other protocols
Diffstat (limited to 'it_url.class')
-rw-r--r--it_url.class6
1 files changed, 6 insertions, 0 deletions
diff --git a/it_url.class b/it_url.class
index 5a65f12..baac7c7 100644
--- a/it_url.class
+++ b/it_url.class
@@ -221,6 +221,9 @@ function is_reachable($timeout = 5)
/**
* Get simple URL with timeout. Can be called statically
+ *
+ * If the protocol is not http, only features of get_multi are supported.
+ *
* @param $p parameter array with the following keys
* @param $p['url']: url to get, defaults to constructor URL
* @param $p['headers']: optional array of HTTP headers to send
@@ -333,6 +336,9 @@ function get($p=null, $timeout=5)
@fclose($fp);
}
+ } else {
+ $results = self::get_multi(array('urls' => array('one' => $p['url'])) + $p);
+ $result = $results['one'];
}
if (time() >= $endtime)