diff options
author | Andrew Dolgov <[email protected]> | 2010-11-13 18:20:51 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2010-11-13 18:20:51 +0300 |
commit | a18a4f387ad74f158c8634adb3e2dfe976364d88 (patch) | |
tree | 41cddc4bd15c61ff7c2491f61b0ae384a23a4c15 /functions.php | |
parent | 35c0e3a27540c35a82b150c4e0df964a9fcef074 (diff) |
change default user-agent
Diffstat (limited to 'functions.php')
-rw-r--r-- | functions.php | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/functions.php b/functions.php index 66b868560..7d7e82893 100644 --- a/functions.php +++ b/functions.php @@ -108,10 +108,13 @@ require_once 'lib/phpmailer/class.phpmailer.php'; require_once 'lib/sphinxapi.php'; - define('MAGPIE_USER_AGENT_EXT', ' (Tiny Tiny RSS/' . VERSION . ')'); + //define('MAGPIE_USER_AGENT_EXT', ' (Tiny Tiny RSS/' . VERSION . ')'); define('MAGPIE_OUTPUT_ENCODING', 'UTF-8'); define('MAGPIE_CACHE_AGE', 60*15); // 15 minutes + define('SELF_USER_AGENT', 'Tiny Tiny RSS/' . VERSION . ' (http://tt-rss.org/)'); + define('MAGPIE_USER_AGENT', SELF_USER_AGENT); + require_once "lib/simplepie/simplepie.inc"; require_once "lib/magpierss/rss_fetch.inc"; require_once 'lib/magpierss/rss_utils.inc'; @@ -629,7 +632,7 @@ } $rss = new SimplePie(); - $rss->set_useragent(SIMPLEPIE_USERAGENT . MAGPIE_USER_AGENT_EXT); + $rss->set_useragent(SELF_USER_AGENT); # $rss->set_timeout(10); $rss->set_feed_url($fetch_url); $rss->set_output_encoding('UTF-8'); @@ -3941,7 +3944,7 @@ if (DEFAULT_UPDATE_METHOD == "1") { $rss = new SimplePie(); - $rss->set_useragent(SIMPLEPIE_USERAGENT . MAGPIE_USER_AGENT_EXT); + $rss->set_useragent(SELF_USER_AGENT); $rss->set_feed_url($fetch_url); $rss->set_output_encoding('UTF-8'); $rss->init(); |