How to set up php curl ssl without opening it

藏色散人
Release: 2023-03-11 20:08:01
Original
1761 people have browsed 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)...".

How to set up php curl ssl without opening it

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);
Copy after login

Related introduction:

curl_setopt - Set cURL transmission options

Instructions

curl_setopt(resource $ch, int $option, mixed $value): bool
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!