Http::curl_before_send( resource|CurlHandle $handle )

In this article

Set cURL parameters before the data is sent

Parameters

$handleresource|CurlHandlerequired
cURL handle

Source

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());
	}
}

Changelog

VersionDescription
1.6Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.