aboutsummaryrefslogtreecommitdiffstats
path: root/include/network.php
diff options
context:
space:
mode:
authorfabrixxm <fabrix.xm@gmail.com>2011-09-05 21:05:24 +0200
committerfabrixxm <fabrix.xm@gmail.com>2011-09-05 21:05:24 +0200
commit2f5a34ad1791f01cacb3b86c11501f0e11c67df4 (patch)
treedd9242b14387c833346f4172e3f190659db56ff7 /include/network.php
parent5ec4a4e6deb5d28cbfab54093f8b4180912738d4 (diff)
parent08e54234e30c10e3130b7d71caba9fd43e3593e3 (diff)
downloadvolse-hubzilla-2f5a34ad1791f01cacb3b86c11501f0e11c67df4.tar.gz
volse-hubzilla-2f5a34ad1791f01cacb3b86c11501f0e11c67df4.tar.bz2
volse-hubzilla-2f5a34ad1791f01cacb3b86c11501f0e11c67df4.zip
Merge branch 'newui' of github.com:fabrixxm/friendika into newui
Diffstat (limited to 'include/network.php')
-rw-r--r--include/network.php28
1 files changed, 14 insertions, 14 deletions
diff --git a/include/network.php b/include/network.php
index 691a8c9f9..2832ae2d3 100644
--- a/include/network.php
+++ b/include/network.php
@@ -9,37 +9,37 @@ function fetch_url($url,$binary = false, &$redirects = 0, $timeout = 0) {
$a = get_app();
- $ch = curl_init($url);
+ $ch = @curl_init($url);
if(($redirects > 8) || (! $ch))
return false;
- curl_setopt($ch, CURLOPT_HEADER, true);
- curl_setopt($ch, CURLOPT_RETURNTRANSFER,true);
- curl_setopt($ch, CURLOPT_USERAGENT, "Friendika");
+ @curl_setopt($ch, CURLOPT_HEADER, true);
+ @curl_setopt($ch, CURLOPT_RETURNTRANSFER,true);
+ @curl_setopt($ch, CURLOPT_USERAGENT, "Friendika");
if(intval($timeout)) {
- curl_setopt($ch, CURLOPT_TIMEOUT, $timeout);
+ @curl_setopt($ch, CURLOPT_TIMEOUT, $timeout);
}
else {
$curl_time = intval(get_config('system','curl_timeout'));
- curl_setopt($ch, CURLOPT_TIMEOUT, (($curl_time !== false) ? $curl_time : 60));
+ @curl_setopt($ch, CURLOPT_TIMEOUT, (($curl_time !== false) ? $curl_time : 60));
}
// by default we will allow self-signed certs
// but you can override this
$check_cert = get_config('system','verifyssl');
- curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, (($check_cert) ? true : false));
+ @curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, (($check_cert) ? true : false));
$prx = get_config('system','proxy');
if(strlen($prx)) {
- curl_setopt($ch, CURLOPT_HTTPPROXYTUNNEL, 1);
- curl_setopt($ch, CURLOPT_PROXY, $prx);
- $prxusr = get_config('system','proxyuser');
+ @curl_setopt($ch, CURLOPT_HTTPPROXYTUNNEL, 1);
+ @curl_setopt($ch, CURLOPT_PROXY, $prx);
+ $prxusr = @get_config('system','proxyuser');
if(strlen($prxusr))
- curl_setopt($ch, CURLOPT_PROXYUSERPWD, $prxusr);
+ @curl_setopt($ch, CURLOPT_PROXYUSERPWD, $prxusr);
}
if($binary)
- curl_setopt($ch, CURLOPT_BINARYTRANSFER,1);
+ @curl_setopt($ch, CURLOPT_BINARYTRANSFER,1);
$a->set_curl_code(0);
@@ -49,7 +49,7 @@ function fetch_url($url,$binary = false, &$redirects = 0, $timeout = 0) {
$s = @curl_exec($ch);
$base = $s;
- $curl_info = curl_getinfo($ch);
+ $curl_info = @curl_getinfo($ch);
$http_code = $curl_info['http_code'];
$header = '';
@@ -80,7 +80,7 @@ function fetch_url($url,$binary = false, &$redirects = 0, $timeout = 0) {
$a->set_curl_headers($header);
- curl_close($ch);
+ @curl_close($ch);
return($body);
}}