diff options
author | friendica <info@friendica.com> | 2013-04-16 20:16:44 -0700 |
---|---|---|
committer | friendica <info@friendica.com> | 2013-04-16 20:16:44 -0700 |
commit | f72d3512242d13fbba69b77a739319a9cd58627c (patch) | |
tree | d59c8904fda78b04ee19e42343d8c7ca56c67a5f /include/network.php | |
parent | 3e7e0a3c43ddb742a6518a3b38b89e3d9675eae5 (diff) | |
parent | 23f897b8aedac8a99aa81ac7799ec67ca196d407 (diff) | |
download | volse-hubzilla-f72d3512242d13fbba69b77a739319a9cd58627c.tar.gz volse-hubzilla-f72d3512242d13fbba69b77a739319a9cd58627c.tar.bz2 volse-hubzilla-f72d3512242d13fbba69b77a739319a9cd58627c.zip |
Merge branch 'master' into photothread
Diffstat (limited to 'include/network.php')
-rw-r--r-- | include/network.php | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/include/network.php b/include/network.php index 427519c7a..d3e6480d6 100644 --- a/include/network.php +++ b/include/network.php @@ -38,8 +38,7 @@ function fetch_url($url,$binary = false, &$redirects = 0, $timeout = 0, $accept_ } @curl_setopt($ch, CURLOPT_RETURNTRANSFER,true); - //@curl_setopt($ch, CURLOPT_USERAGENT, "Friendica"); - @curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (compatible; Friendica)"); + @curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (compatible; Red)"); if(intval($timeout)) { @@ -124,7 +123,7 @@ function post_url($url,$params, $headers = null, &$redirects = 0, $timeout = 0) curl_setopt($ch, CURLOPT_RETURNTRANSFER,true); curl_setopt($ch, CURLOPT_POST,1); curl_setopt($ch, CURLOPT_POSTFIELDS,$params); - curl_setopt($ch, CURLOPT_USERAGENT, "Friendica"); + curl_setopt($ch, CURLOPT_USERAGENT, "Red"); if(intval($timeout)) { curl_setopt($ch, CURLOPT_TIMEOUT, $timeout); @@ -240,7 +239,7 @@ function z_fetch_url($url, $binary = false, $redirects = 0, $opts = array()) { @curl_setopt($ch, CURLOPT_CAINFO, get_capath()); @curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true); @curl_setopt($ch, CURLOPT_RETURNTRANSFER,true); - @curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (compatible; Friendica Red)"); + @curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (compatible; Red)"); if (x($opts,'accept_content')){ curl_setopt($ch,CURLOPT_HTTPHEADER, array ( @@ -335,7 +334,7 @@ function z_post_url($url,$params, $headers = null, $redirects = 0, $timeout = 0) curl_setopt($ch, CURLOPT_RETURNTRANSFER,true); curl_setopt($ch, CURLOPT_POST,1); curl_setopt($ch, CURLOPT_POSTFIELDS,$params); - curl_setopt($ch, CURLOPT_USERAGENT, "Friendica"); + curl_setopt($ch, CURLOPT_USERAGENT, "Red"); if(intval($timeout)) { curl_setopt($ch, CURLOPT_TIMEOUT, $timeout); @@ -1094,7 +1093,7 @@ function scale_external_images($s, $include_link = true, $scale_replace = false) logger('scale_external_images: ' . $orig_width . '->' . $new_width . 'w ' . $orig_height . '->' . $new_height . 'h' . ' match: ' . $mtch[0], LOGGER_DEBUG); $s = str_replace($mtch[0],'[img=' . $new_width . 'x' . $new_height. ']' . $scaled . '[/img]' . "\n" . (($include_link) - ? '[url=' . $mtch[1] . ']' . t('view full size') . '[/url]' . "\n" + ? '[zrl=' . $mtch[1] . ']' . t('view full size') . '[/zrl]' . "\n" : ''),$s); logger('scale_external_images: new string: ' . $s, LOGGER_DEBUG); } |