This article mainly introduces the certificate error when phpcurl logs on to qq and obtains user information. For more information, see
This article mainly introduces the certificate error when php curl logs on to qq and obtains user information. For more information, see
The QQ login function of ecmall mall is available tonight and an error is generated during callback. When executing the file_get_contents function, the correct information is not captured. Therefore, 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.