This article mainly introduces the certificate error when phpcurl logs on to qq and obtains user information. if you need it, refer to the QQ login function of ecmall mall which will be opened tonight to generate an error during callback, when executing the file_get_contents function, the correct information is not captured, so the curl is used, but a certificate error is prompted.
The solution found on the internet is to remove 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 saying on the Internet:
The code is as follows:
Curl_setopt ($ ch, CURLOPT_HTTPHEADER, array ('CT :'));
However, the test results are incorrect.
It is a very simple solution, but it takes a lot of effort to check the information. here we will record it and share it with you.