A certificate error occurs when phpcurl logs on to qq and obtains user information.

Source: Internet
Author: User
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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.