diff options
author | Stig Bakken <ssb@php.net> | 2002-10-02 21:27:25 +0000 |
---|---|---|
committer | Stig Bakken <ssb@php.net> | 2002-10-02 21:27:25 +0000 |
commit | 01daca5e10cfbebc225864e56b04c15dae54367a (patch) | |
tree | e1fb8cb9022fb1cdb62444303f871ebe587e0051 /pear/PEAR/Remote.php | |
parent | ca0aced7c99a18e6337b3519a1a0ee7ce82605ed (diff) | |
download | php-git-01daca5e10cfbebc225864e56b04c15dae54367a.tar.gz |
* add support for http proxy authorization (thanks Arnaud)
Diffstat (limited to 'pear/PEAR/Remote.php')
-rw-r--r-- | pear/PEAR/Remote.php | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/pear/PEAR/Remote.php b/pear/PEAR/Remote.php index 353f94ff88..aa122c0513 100644 --- a/pear/PEAR/Remote.php +++ b/pear/PEAR/Remote.php @@ -64,6 +64,13 @@ class PEAR_Remote extends PEAR 'lastChange' => filemtime($filename), 'content' => unserialize(implode('', file($filename))), ); + $proxy_host = $proxy_port = $proxy_user = $proxy_pass = ''; + if ($proxy = parse_url($this->config->get('http_proxy'))) { + $proxy_host = @$proxy['host']; + $proxy_port = @$proxy['port']; + $proxy_user = @$proxy['user']; + $proxy_pass = @$proxy['pass']; + } return $result; } @@ -116,7 +123,7 @@ class PEAR_Remote extends PEAR } else { $maxAge = ''; }; - $c = new XML_RPC_Client('/xmlrpc.php'.$maxAge, $server_host, 80); + $c = new XML_RPC_Client('/xmlrpc.php'.$maxAge, $server_host, 80, $proxy_host, $proxy_port, $proxy_user, $proxy_pass); if ($username && $password) { $c->setCredentials($username, $password); } |