Home > Backend Development > PHP Tutorial > Certificate error when obtaining user information after php curl logs in to QQ_PHP tutorial

Certificate error when obtaining user information after php curl logs in to QQ_PHP tutorial

WBOY
Release: 2016-07-13 10:08:03
Original
866 people have browsed it

Certificate error when php curl obtains user information after logging into qq

This article mainly introduces the certificate error when php curl obtains user information after logging into qq. Friends who need it can refer to it.

The QQ login function of the ecmall mall was opened tonight. An error occurred during the callback. When the file_get_contents function was executed, the correct information was not captured, so curl was used instead, but a certificate error was prompted.

I found a solution online, which is to remove the certificate authentication.

The code is as follows:

curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);

curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);

This method is feasible.

There is another way to say it online, which is to use

The code is as follows:

curl_setopt($ch, CURLOPT_HTTPHEADER, array('Expect:'));

But the test results are wrong.

Very simple solution, but it took a lot of effort to search for information. I will record it here and share it with everyone.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/952851.htmlTechArticleCertificate error when php curl gets user information after logging into qq. This article mainly introduces php curl to get users after logging into qq. The certificate is wrong in the information. Friends who need it can refer to the ecma opening tonight...
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