通过CURL和客户端浏览器登录网站 [英] Login to website through CURL and client browser

查看:293
本文介绍了通过CURL和客户端浏览器登录网站的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前的情况如下。

我在websitea.com上有vbulletin论坛。

I have a vbulletin forum on websitea.com

使用vbulletin登录表单登录,在成功登录后,我使用vbulletin插件访问websiteb.com上的api通过curl。这个api设置会话信息登录到websiteb.com上的用户

I log in using the vbulletin login form, on successful login i use a vbulletin plugin to access an api through curl on websiteb.com. This api sets session information to log in the user on websiteb.com

我的问题是,现在当我通过浏览器访问websiteb.com的用户没有登录进入网站。

The problem I have is that now when i visit websiteb.com through the browser the user is not logged into the website.

有没有反正要让这工作?

Is there anyway to get this to work? Or should i approach this from another angle?

感谢

推荐答案

如果你想通过CURL登录很容易,如果你想发送cookie信息在CURL中使用的请求的标题很容易。

IF you wanna login through CURL that's easy, if you wanna send the cookie info in the headers of the request used in CURL that's easy too.

但如果你想登录通过CURL和在用户的浏览器中使用这样的cookie是不可能的。 。

but if you want to login through CURL and use such cookies in the User's browser it's impossible . .

这篇关于通过CURL和客户端浏览器登录网站的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆