Created
February 27, 2012 16:45
-
-
Save Gipetto/1925295 to your computer and use it in GitHub Desktop.
Proxy configuration for OpenVBX & Twilio-PHP api library
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 | |
// template for setting CURL proxy options for OpenVBX | |
// add the configuration lines below to the file | |
// `OpenVBX/libraries/OpenVBX.php` on line 375 with the | |
// config below and then enter the values for your Proxy | |
// proxy type | |
$_proxy_type = 'HTTP'; // proxy type | |
// The address of your proxy server | |
$_proxy_server = 'http://00.00.00.00/'; | |
// The port that your proxy server runs on | |
$_proxy_port = '0000'; | |
// your username & password for this server | |
// leave blank if the server doesn't require authentication | |
$_proxy_userpass = 'user:password'; | |
$proxy_opts = array( | |
CURLOPT_PROXY => $_proxy_server, | |
CURLOPT_PROXYPORT => $_proxy_port, | |
CURLOPT_PROXYTYPE => $_proxy_type | |
); | |
if (!empty($_proxy_userpass)) { | |
$proxy_opts[CURLOPT_PROXYUSERPWD] = $_proxy_userpass; | |
} | |
$_http_opts['opts']['curlopts'] = array_merge($_http_opts['opts']['curlopts'], $proxy_opts); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment