Skip to content

Instantly share code, notes, and snippets.

@Gipetto
Created February 27, 2012 16:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save Gipetto/1925295 to your computer and use it in GitHub Desktop.
Save Gipetto/1925295 to your computer and use it in GitHub Desktop.
Proxy configuration for OpenVBX & Twilio-PHP api library
<?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