diff options
author | Nathan Gass | 2011-09-27 17:16:30 +0000 |
---|---|---|
committer | Nathan Gass | 2011-09-27 17:16:30 +0000 |
commit | b881c0cf629c99ec7cf3067164523036e9dcdfb4 (patch) | |
tree | f6a90a50e58575d2e1bf8308d08e0ab8e258d28e | |
parent | a937111319299a5af1390496329410d89fcb6ef8 (diff) | |
download | itools-b881c0cf629c99ec7cf3067164523036e9dcdfb4.tar.gz itools-b881c0cf629c99ec7cf3067164523036e9dcdfb4.tar.bz2 itools-b881c0cf629c99ec7cf3067164523036e9dcdfb4.zip |
fall back on get_multi for other protocols
-rw-r--r-- | it_url.class | 6 |
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) |