Skip to content

Commit

Permalink
Merge pull request #161 from MichalMMac/master
Browse files Browse the repository at this point in the history
Add proxy support
  • Loading branch information
erunion authored Mar 20, 2018
2 parents 9e60ff0 + 14fb95a commit e50f925
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/Vimeo/Vimeo.php
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,22 @@ public function setCURLOptions($curl_opts = array())
$this->_curl_opts = $curl_opts;
}

/**
* @param $proxyAddress mandatory address of proxy
* @param null $proxyPort optional number of port
* @param null $proxyPass optional user:password authentication
*/
public function setProxy($proxyAddress, $proxyPort=null, $proxyUserPwd=null)
{
$this->CURL_DEFAULTS[CURLOPT_PROXY] = $proxyAddress;
if ($proxyPort) {
$this->CURL_DEFAULTS[CURLOPT_PROXYPORT] = $proxyPort;
}
if ($proxyUserPwd) {
$this->CURL_DEFAULTS[CURLOPT_PROXYUSERPWD] = $proxyUserPwd;
}
}

/**
* Convert the raw headers string into an associated array
*
Expand Down

0 comments on commit e50f925

Please sign in to comment.