使用 curl 的 phpbb3 外部登录

phpbb3 external login with curl

我已经为我的网站创建了一个扩展。它应该在用户登录网站后登录论坛。

用户会话已成功创建(已在数据库中检查),但用户仍未登录。

如果我尝试使用外部登录表单登录,效果很好(会话已创建且用户已登录)。

我认为问题不在我的身份验证扩展中。

我想我在 curl post 和 cookie 上做错了。

我应该设置什么 curl 选项来登录?或者你可以给我一些有用的链接吗?

Take some of those phpbb3_* cookies and then send them through [setcookie()](php.net/setcookie) to pass along to the user. It might work, depending on your level of cookie security in phpBB (it can't be tied to IP because curl and the user IP will be different

drew010

You won't be able to use curl and pass the cookies to the client if you >have Session IP validation turned on. I'd suggest turning that off, or, >instead of using curl, look for a plugin/module that can do 3rd party >logins, or look at the authentication handling code and replicate it. It >wouldn't take much to log a user in without requiring their phpBB password

drew010