1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-22 22:41:29 +00:00

af_comics: add happyjar

This commit is contained in:
Andrew Dolgov
2014-02-10 23:03:58 +04:00
parent 18d33ec18b
commit f826070c56
2 changed files with 14 additions and 3 deletions

View File

@@ -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);