PHPSESSID WebClient上的Cookie不起作用 [英] PHPSESSID Cookie over WebClient doesn't work

查看:262
本文介绍了PHPSESSID WebClient上的Cookie不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试使用一个已经有PHPSESSID作为cookie。
我从Firefox获得了freh,所以ID是100%正确,但结果是每次网站登录,而不是请求的网站。

i try to use a allready there PHPSESSID as a cookie. I got them freh from Firefox, so the ID is 100% correct, but the result is everytime the site for login, not the requested site.

String site = "";
WebClient client = new WebClient();
          client.Headers.Add(HttpRequestHeader.Cookie, "PHPSESSID=fa90a8305a378254aefc371f875a86b2");
        result = client.DownloadString(site);

我错了什么?

推荐答案

我不熟悉WebClient或者你在.NET中编写什么语言?
无论哪种方式,总是有可能您的设置cookie错误,除此之外,PHPSESSID不总是唯一的身份验证形式,可以转到IP地址和用户代理字符串等。

I am not familiar with WebClient or what language you are writing this in. .NET? Either way, there is always the possibility that your setting the cookie wrong, in addition to that, the PHPSESSID Is not always the ONLY form of identification for authentication and can go onto IP Address and user-agent string, etc.

我不确定您尝试做什么,也许更好的解释会有帮助吗?

I am not sure what you are attempting to do however, maybe a better explaination would help?

这篇关于PHPSESSID WebClient上的Cookie不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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