Ucenter Discuz and official examples cannot be logged in and out of sync

Source: Internet
Author: User
I am using the Discuz X3.1 version.
Download the Ucenter_1.6.0_sc_utf8
Examples of official use now
\ucenter_1.6.0_sc_utf8\advanced\examples below the ucexample_1.php
Ucenter communicates successfully with ucexample_1.php (Ucenter has display communication success).
From the discuz above the landing exit, ucexample_1.php can log out.
However, from the ucexample_1.php login to exit, Discuz can not sync log in and exit. What is the reason? Ask for advice.


Reply to discussion (solution)

Ask the expert to point out a bit. Wait.

It is difficult to integrate other people's things.

How could it be? You must be wrong.
is a Niang, how to become someone else?

This is true, the heart that wants to die has.

Only the registration can be synchronized.

After using Uc_user_synlogin, the returned script is entered into the page execution to ensure that other apps are logged in synchronously

Http://faq.comsenz.com/library/UCenter/interface/interface_user.htm

The principle is to set/delete cookies under other websites through the SRC attribute of the script.

How could it be? You must be wrong.
is a Niang, how to become someone else?


OK. Turned out to be
Uc_appid
Uc_ppp
These two parameters are not filled in correctly.

How could it be? You must be wrong.
is a Niang, how to become someone else?


Now I want to integrate a Java program with this ucenter.
But notify other applications to synchronize the login and exit code is JS write, need browser to execute, do not know Java PHP-like Curl to replace this JS do not know is not feasible?

After using Uc_user_synlogin, the returned script is entered into the page execution to ensure that other apps are logged in synchronously

Http://faq.comsenz.com/library/UCenter/interface/interface_user.htm

The principle is to set/delete cookies under other websites through the SRC attribute of the script.


Now I want to integrate a Java program with this ucenter.
But notify other applications to synchronize the login and exit code is JS write, need browser to execute, do not know Java PHP-like Curl to replace this JS do not know is not feasible?

I tried, it didn't work, curl. Access Cannot set cookies

In other words, what do you sign in with? No browser?

I tried, it didn't work, curl. Access Cannot set cookies

In other words, what do you sign in with? No browser?


I want to integrate a JSP program.
Then use PHP to relay, the PHP program written to the Java program. Let the Java program go to the call. Java-written programs are not able to call PHP functions.
Do you have any way?

I tried, it didn't work, curl. Access Cannot set cookies

In other words, what do you sign in with? No browser?


Curl simulates a GET request, and the cookie is set by the app over there.

Of course you can!

Process is a problem
The main thing is to see what he's returning.

I didn't succeed anyway, so I still use SRC to set the cookie

Java should also have a login on this side of Ah, otherwise how do you know to call the function of synchronous login

Process is a problem
The main thing is to see what he's returning.


That's what I'm thinking.
They use Java through HTTP (curl,get,post) request my PHP program, I use PHP and Ucenter connection, and then return the results to Java, this process has a problem?
Is there a better way to solve it?

There is no problem with the process, the question is how does Java stay logged in?

There is no problem with the process, the question is how does Java stay logged in?


When Java gets the login notification of other related websites, it triggers the login action, such as writing the session (to execute his login process, which seems to be easy?). After receiving other relevant station exit notification, then perform the exit operation, such as destroying the session, so that does not work?

You're thinking, is that the process?

You're thinking, is that the process?


I really do not know what the problem, seeking guidance, only to avoid my detours.

You're thinking, is that the process?


Please help me to point out what is wrong, I will start work these days. It's really urgent.


How could it be? You must be wrong.
is a Niang, how to become someone else?


OK. Turned out to be
Uc_appid
Uc_ppp
These two parameters are not filled in correctly.



Landlord, Trouble ask you how to solve the method is how to modify the two parameters you said? I met with your similar problem, can be from the main station to sync to Discuz, but exit can not sync out of Discuz, in the Discuz log out can not sync to the main station, could you solve the method? Thank 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.