aboutsummaryrefslogtreecommitdiffstats
path: root/boot.php
diff options
context:
space:
mode:
authorMike Macgirvin <mike@macgirvin.com>2010-08-17 18:44:13 -0700
committerMike Macgirvin <mike@macgirvin.com>2010-08-17 18:44:13 -0700
commit1a1f9b296c163af850d68babfb844e617f154875 (patch)
tree3ded181e34a21908831021369680b5177bbab8a0 /boot.php
parent478f84d9f2ccdad429aadb0d47b196db11c02945 (diff)
downloadvolse-hubzilla-1a1f9b296c163af850d68babfb844e617f154875.tar.gz
volse-hubzilla-1a1f9b296c163af850d68babfb844e617f154875.tar.bz2
volse-hubzilla-1a1f9b296c163af850d68babfb844e617f154875.zip
contact search + sync to personal edition, installer db check + curl proxy
Diffstat (limited to 'boot.php')
-rw-r--r--boot.php16
1 files changed, 16 insertions, 0 deletions
diff --git a/boot.php b/boot.php
index 5d476649d..eae44c672 100644
--- a/boot.php
+++ b/boot.php
@@ -241,6 +241,14 @@ function fetch_url($url,$binary = false) {
curl_setopt($ch, CURLOPT_FOLLOWLOCATION,true);
curl_setopt($ch, CURLOPT_MAXREDIRS,8);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,true);
+ $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');
+ if(strlen($prxusr))
+ curl_setopt($ch, CURLOPT_PROXYUSERPWD, $prxusr);
+ }
if($binary)
curl_setopt($ch, CURLOPT_BINARYTRANSFER,1);
@@ -261,6 +269,14 @@ function post_url($url,$params) {
curl_setopt($ch, CURLOPT_RETURNTRANSFER,true);
curl_setopt($ch, CURLOPT_POST,1);
curl_setopt($ch, CURLOPT_POSTFIELDS,$params);
+ $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');
+ if(strlen($prxusr))
+ curl_setopt($ch, CURLOPT_PROXYUSERPWD, $prxusr);
+ }
$s = curl_exec($ch);
curl_close($ch);