在 ASP.NET 和 PHP 之间共享会话数据
我正在构建一个带有 WordPress 首页和 CMS 的自定义 .net Web 应用程序。
我正在使用会话变量来检查用户是否登录到网络应用程序。
我想要做的是在 wordpress 上显示用户是否登录到 web 应用程序。
这可能吗?如果可能的话,有人知道我将如何去做吗?
谢谢, 安德鲁
I'm building a custom .net web app with a wordpress frontpage and CMS.
I'm using session variables to check if the user is logged in to the web app.
What I'd like to be able to do is display on wordpress whether or not the user is logged in to the webapp.
Is this possible and if so does anybody know how I would go about doing it?
Thanks,
Andrew
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用 cookie 和数据库。该 cookie 包含该会话的一些唯一 ID,您将其存储在数据库中。关于 cookie,没有任何特定于 asp.net 或 php 的内容。任一应用程序都可以从 cookie 中获取密钥,并在数据库中查找会话信息。
Use a cookie and a database. The cookie contains some unique ID for that session, which you store in the database. Nothing specific to asp.net or php about cookies. Either app can obtain the key from the cookie, and look up the session info in the database.