Created
March 28, 2009 07:35
-
-
Save sasezaki/87053 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$pear_conf = new PEAR_Config; | |
$clientConfig = array(); | |
// check proxy | |
if ($http_proxy = $pear_conf->get('http_proxy')) { | |
$uri = Zend_Uri_Http::fromString($http_proxy); | |
if ($uri->getUsername()) $config['proxy_username'] = $uri->getUsername(); | |
if ($uri->getHost()) $config['proxy_host'] = $uri->getHost(); | |
if ($uri->getPort()) $config['proxy_port'] = $uri->getPort(); | |
$clientConfig = array_merge(array('adapter'=>'Zend_Http_Client_Adapter_Proxy'), $config); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment