Synchronization interface in UCenteruc. php

Source: Internet
Author: User
What I want to do is to implement synchronous login and logout between ThinkPHP and Discuz users. Due to time constraints and lack of contact with Discuz before, it is directly in the Discuz uc. add a Verification Branch in php to call the synlogin and synlogout methods, and then use... what I want to do is to implement synchronous login and logout between ThinkPHP and Discuz users.
Due to time constraints and lack of contact with Discuz before, it is directly in the Discuz uc. in php, an additional verification branch is added to call the synlogin and synlogout methods, and then the interface is called through CURL in ThinkPHP.

But now the problem is:The CURL interface call can successfully set the Cookie value of the user State, but the Cookie is not actually set to Discuz; if the same request header and method are used to access the interface through the browser, the Cookie can be successfully set..
I would like to know what caused the CURL interface to fail to set the Cookie.

Reply content:

What I want to do is to implement synchronous login and logout between ThinkPHP and Discuz users.
Due to time constraints and lack of contact with Discuz before, it is directly in the Discuz uc. in php, an additional verification branch is added to call the synlogin and synlogout methods, and then the interface is called through CURL in ThinkPHP.

But now the problem is:The CURL interface call can successfully set the Cookie value of the user State, but the Cookie is not actually set to Discuz; if the same request header and method are used to access the interface through the browser, the Cookie can be successfully set..
I would like to know what caused the CURL interface to fail to set the Cookie.

Go to the discuz official website and check the development manual. The ucenter in it supports synchronous login and logout.
Http://www.comsenz.com/downloads/install/ucenter

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.