diff options
author | Andrew Dolgov <[email protected]> | 2014-02-10 23:03:58 +0400 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2014-02-10 23:03:58 +0400 |
commit | f826070c560661c7d2eff0bb16b7782cc524937d (patch) | |
tree | cce953ec6c4d995e73995c7d639430f4f20c1c69 /include/functions.php | |
parent | 18d33ec18b5f19d73e2c150a1e6176774cfab863 (diff) |
af_comics: add happyjar
Diffstat (limited to 'include/functions.php')
-rw-r--r-- | include/functions.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/functions.php b/include/functions.php index 821ca83f0..8e8832a58 100644 --- a/include/functions.php +++ b/include/functions.php @@ -339,7 +339,7 @@ } } - function fetch_file_contents($url, $type = false, $login = false, $pass = false, $post_query = false, $timeout = false, $timestamp = 0) { + function fetch_file_contents($url, $type = false, $login = false, $pass = false, $post_query = false, $timeout = false, $timestamp = 0, $useragent = false) { global $fetch_last_error; global $fetch_last_error_code; @@ -376,7 +376,8 @@ curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_ANY); - curl_setopt($ch, CURLOPT_USERAGENT, SELF_USER_AGENT); + curl_setopt($ch, CURLOPT_USERAGENT, $useragent ? $useragent : + SELF_USER_AGENT); curl_setopt($ch, CURLOPT_ENCODING, ""); curl_setopt($ch, CURLOPT_REFERER, $url); |