Requests_Proxy_HTTP::curl_before_send()
最后更新于:2021-12-01 11:09:05
Requests_Proxy_( resource$handle)Set cURL parameters before the data is sent
参数
- $handle
-
(resource) (Required) cURL resource
源文件
文件: gc-includes/Requests/Proxy/HTTP.php
public function curl_before_send(&$handle) {
curl_setopt($handle, CURLOPT_PROXYTYPE, CURLPROXY_HTTP);
curl_setopt($handle, CURLOPT_PROXY, $this->proxy);
if ($this->use_authentication) {
curl_setopt($handle, CURLOPT_PROXYAUTH, CURLAUTH_ANY);
curl_setopt($handle, CURLOPT_PROXYUSERPWD, $this->get_auth_string());
}
}