Table of Contents
回复讨论(解决方案)
Home Backend Development PHP Tutorial ucenter中discuz与官方的例子不能同步登入和退出

ucenter中discuz与官方的例子不能同步登入和退出

Jun 23, 2016 pm 01:48 PM
discuz example Synchronize official quit


我使用的是discuz X3.1版本。
下载了UCenter_1.6.0_SC_UTF8
现使用官方的例子
\UCenter_1.6.0_SC_UTF8\advanced\examples下面的ucexample_1.php
ucenter与ucexample_1.php通信成功(ucenter有显示通信成功)。
从discuz上面登陆退出,ucexample_1.php可以登陆退出。
但是从ucexample_1.php登陆退出,discuz却无法同步登入退出。到底是什么原因呢?求指点。


回复讨论(解决方案)

求高手指点一下。坐等。

整合别人的东西就是难。

怎么可能呢?肯定是你哪儿弄得不对了
都是一个娘养的,怎么成了别人?

真是这样,想死的心都有了。

只可以同步注册。

使用uc_user_synlogin后,返回的script要输入到页面执行,才能保证其它应用同步登录

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

原理就是通过script 的src属性来设置/删除其他网站下的cookie

怎么可能呢?肯定是你哪儿弄得不对了
都是一个娘养的,怎么成了别人?


可以了。原来是
UC_APPID
UC_PPP
这两个参数没有填正确。

怎么可能呢?肯定是你哪儿弄得不对了
都是一个娘养的,怎么成了别人?


现在我想用这个ucenter整合一个java程序。
但是通知其他应用程序同步登陆与退出的代码是js写的,需浏览器才能执行,不知用java的类似php的curl去代替这个js不知可不可行?

使用uc_user_synlogin后,返回的script要输入到页面执行,才能保证其它应用同步登录

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

原理就是通过script 的src属性来设置/删除其他网站下的cookie


现在我想用这个ucenter整合一个java程序。
但是通知其他应用程序同步登陆与退出的代码是js写的,需浏览器才能执行,不知用java的类似php的curl去代替这个js不知可不可行?

我试过,没成功,curl访问不能设置cookie

话说,你用什么登录?不用浏览器?

我试过,没成功,curl访问不能设置cookie

话说,你用什么登录?不用浏览器?


我要整合一个jsp程序。
然后用php中转,把php写的程序发给java的程序。让java程序去调用。java写的程序是调用不了php的函数的。
你有什么方法吗?

我试过,没成功,curl访问不能设置cookie

话说,你用什么登录?不用浏览器?


curl模拟一个get请求,由那边的应用设置cookie,难道这不行吗?

当然可以的!

流程是个问题
主要是看他返回的是什么

反正我是没成功,所以我还是用src来设的cookie

java这边也应该有登录才对啊,不然你怎么知道要去调用同步登陆的函数

流程是个问题
主要是看他返回的是什么


我是这样想的,
他们用java通过http(curl,get,post都行)请求我的php程序,我用php和ucenter连接,然后把结果返回给java,这个流程有问题吗?
有没有更好的解决方法呢?

流程没有问题,问题在于 Java 如何保持登录状态?

流程没有问题,问题在于 Java 如何保持登录状态?


当java得到其它相关网站的登录通知后,就触发登录动作,如开如写session之类的操作(执行他的登陆流程,这个好像很容易吧?)当收到其它相关的站退出通知后后就执行退出操作,如销毁session,这样不行吗?

你在想想,是这样的流程吗?

你在想想,是这样的流程吗?


我真的不知道有什么问题,求指点,只免我走弯路。

你在想想,是这样的流程吗?


麻烦帮我指出哪儿不妥,我就这几天要开始干活了。真的很急。


怎么可能呢?肯定是你哪儿弄得不对了
都是一个娘养的,怎么成了别人?


可以了。原来是
UC_APPID
UC_PPP
这两个参数没有填正确。


楼主,麻烦问下你解决的方法是怎么修改你所说的两个参数的呢?我遇到了和你差不多的问题,可以从主站登陆同步到discuz,但是退出不能同步退出discuz;在discuz登陆退出都不能同步到主站,可以说下你解决的方法吗?谢谢。

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

One or more items in the folder you synced do not match Outlook error One or more items in the folder you synced do not match Outlook error Mar 18, 2024 am 09:46 AM

When you find that one or more items in your sync folder do not match the error message in Outlook, it may be because you updated or canceled meeting items. In this case, you will see an error message saying that your local version of the data conflicts with the remote copy. This situation usually happens in Outlook desktop application. One or more items in the folder you synced do not match. To resolve the conflict, open the projects and try the operation again. Fix One or more items in synced folders do not match Outlook error In Outlook desktop version, you may encounter issues when local calendar items conflict with the server copy. Fortunately, though, there are some simple ways to help

Why are wallpapers gone after wallpaperengine exits? Why are wallpapers gone after wallpaperengine exits? Mar 12, 2024 pm 05:40 PM

Users can get various wallpapers by using wallpaperengine. Many users don't know why the wallpapers are gone after wallpaperengine exits. Dynamic wallpapers can only run on the desktop when the software you installed the wallpaper is turned on. Why are the wallpapers gone after wallpaperengine exits? 1. Dynamic wallpapers can only run on the desktop when the software you installed the wallpaper is turned on. 2. WallpaperEngine overwrites the original wallpaper, and of course it will be gone when you exit. 3. The wallpaper is still there after it is turned off, unless the file format is an image type, which can be obtained through some means, but it is not dynamic. 4. There is no video or dynamic image as a wall in Windows.

Detailed explanation of Discuz registration process: allowing you to easily modify personal information Detailed explanation of Discuz registration process: allowing you to easily modify personal information Mar 13, 2024 pm 12:21 PM

"Detailed Explanation of Discuz Registration Process: Allowing you to easily modify personal information, specific code examples are required" Discuz is a powerful community forum program that is widely used in various websites. It provides a wealth of user registration and personal information modification. functions and interfaces. This article will introduce you to Discuz's registration process in detail and provide specific code examples to help you easily customize and modify your personal information. 1. User registration process In Discuz, user registration is one of the important functions of the site. The smoothness of the registration process and

How to withdraw from Meituan Mutual Aid_Meituan's steps to withdraw from mutual aid How to withdraw from Meituan Mutual Aid_Meituan's steps to withdraw from mutual aid Mar 28, 2024 pm 03:01 PM

1. After logging in to your Meituan account, you first need to click on the [My] function. 2. After entering the [My] page, click the [Enter Wallet] function on the page. 3. The [Meituan Wallet] page will pop up, then scroll down to the bottom and click the [Meituan Mutual Aid] function in the [More Services] column. 4. At this time, you will enter the [Meituan Mutual Aid] page, and then click the [View Details] function on the page. 5. After entering the [Mutual Aid Details] page, scroll down to the bottom again, and then click the [Waiver of Protection] function. 6. A dialog box will pop up. Then click the [Deterministic Exit] function in the dialog box to successfully exit Meituan Mutual Aid.

What is the use of Douyin fan club? How to leave someone else's fan club? What is the use of Douyin fan club? How to leave someone else's fan club? Apr 01, 2024 am 09:51 AM

With the rapid development of mobile Internet, social media has become an indispensable part of people's lives. As one of the most popular social platforms, Douyin has won the love of a large number of users for its short video content and lively and interesting creativity. On Douyin, many users will join various fan groups, so what is the use of Douyin fan groups? 1. What is the use of Douyin fan club? The Douyin fan group provides users with a community that gathers interested enthusiasts. In this community, users can find like-minded people to discuss and share topics of interest. Whether you are a groupie, a music lover or a food expert, as long as you have the same interests and hobbies, you can find your own small circle in the Douyin fan group. The Douyin fan group also provides users with a

A must-have for Discuz users! Comprehensive analysis of renaming props! A must-have for Discuz users! Comprehensive analysis of renaming props! Mar 12, 2024 pm 10:15 PM

A must-have for Discuz users! Comprehensive analysis of renaming props! In the Discuz forum, the name change function has always received much attention and demand from users. For some users who need to change their name, name change props can easily modify the user name, and this is also an interesting way of interaction. Let’s take an in-depth look at the renaming props in Discuz, including how to obtain them, how to use them, and solutions to some common problems. 1. Obtain name-changing props in Discuz. Name-changing props are usually purchased through points or the administrator

Solve the problem that Discuz WeChat sharing cannot be displayed Solve the problem that Discuz WeChat sharing cannot be displayed Mar 09, 2024 pm 03:39 PM

Title: To solve the problem that Discuz WeChat shares cannot be displayed, specific code examples are needed. With the development of the mobile Internet, WeChat has become an indispensable part of people's daily lives. In website development, in order to improve user experience and expand website exposure, many websites will integrate WeChat sharing functions, allowing users to easily share website content to Moments or WeChat groups. However, sometimes when using open source forum systems such as Discuz, you will encounter the problem that WeChat shares cannot be displayed, which brings certain difficulties to the user experience.

Discuz Editor: Powerful web page editing tool Discuz Editor: Powerful web page editing tool Mar 09, 2024 pm 06:06 PM

Discuz Editor: A powerful web page editing tool that requires specific code examples. With the development of the Internet, website construction and content editing have become more and more important. As a common web page editing tool, Discuz editor plays an important role in website construction. It not only provides a wealth of functions and tools, but also helps users edit and publish content more conveniently. In this article, we will introduce the features and usage of the Discuz editor, and provide some specific code examples to help readers better understand and use

See all articles