curl_handle, CURLOPT_SSL_VERIFYPEER, FALSE)..."."/> curl_handle, CURLOPT_SSL_VERIFYPEER, FALSE)...".">
Home > Article > Backend Development > How to set up php curl ssl without opening it
php How to disable SSL in curl: First open the corresponding PHP file; then cancel SSL verification through "curl_setopt($this->curl_handle, CURLOPT_SSL_VERIFYPEER, FALSE)...".
The operating environment of this article: windows7 system, PHP7.1 version, DELL G3 computer
How to set up php curl ssl without opening it?
php curl function does not require SSL verification
//这两行取消ssl验证,否则会校验证书。。。 这两个缺一不可 curl_setopt($this->curl_handle, CURLOPT_SSL_VERIFYPEER, FALSE); curl_setopt($this->curl_handle, CURLOPT_SSL_VERIFYHOST, FALSE);
Related introduction:
curl_setopt - Set cURL transmission options
Instructions
curl_setopt(resource $ch, int $option, mixed $value): bool
is cURL session handle settings options.
Parameters
handle
The cURL handle returned by curl_init().
option
CURLOPT_XXX options that need to be set.
value
The value that will be set on the option option.
Recommended learning: "PHP Video Tutorial"
The above is the detailed content of How to set up php curl ssl without opening it. For more information, please follow other related articles on the PHP Chinese website!