+ $sProxy = 'tcp://'.getSetting('HTTP_PROXY_HOST').':'.getSetting('HTTP_PROXY_PROT');
+ $aHeaders = array();
+
+ $sLogin = getSetting('HTTP_PROXY_LOGIN');
+ $sPassword = getSetting('HTTP_PROXY_PASSWORD');
+
+ if ($sLogin && $sPassword) {
+ $sAuth = base64_encode($sLogin.':'.$sPassword);
+ $aHeaders = array('Proxy-Authorization: Basic '.$sAuth);
+ }
+
+ $aProxyHeader = array(
+ 'proxy' => $sProxy,
+ 'request_fulluri' => true,
+ 'header' => $aHeaders
+ );