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

Certificate error when obtaining user information after php curl logs in to QQ, curl user information_PHP tutorial

WBOY
WBOYOriginal
2016-07-13 10:08:01907browse

Certificate error when php curl obtains user information after logging in to QQ, curl user information

The QQ login function of 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.

Copy code 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

Copy code The code is as follows:

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

But the test results are wrong.

A 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/953147.htmlTechArticleCertificate error when php curl obtains user information after logging in to QQ, curl user information will open the QQ login function of ecmall mall tonight , an error occurs during the callback. When the file_get_contents function is executed, there is no...
Statement:
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