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