A certificate error occurs when phpcurl logs on to qq and obtains user information. curl user information _ PHP Tutorial

Source: Internet
Author: User
When phpcurl logs on to qq and obtains user information, the certificate is incorrect. curl user information. A certificate error occurs when phpcurl logs on to qq and obtains user information. the QQ login function of ecmall mall is available tonight for curl user information. an error occurs during callback. when the file_get_contents function is executed, the certificate is incorrect when no php curl is used to log on to qq and obtain user information. curl user information

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.

Http://www.bkjia.com/PHPjc/953147.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/953147.htmlTechArticlephp curl login qq after obtaining user information certificate error, curl user information open ecmall mall QQ login function tonight, errors are generated in the callback, file_get_contents function execution, no...

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.