PHPSESSID Cookie over WebClient doesn't work

核能气质少年 提交于 2019-12-08 04:53:19

问题


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);

what do I wrong?


回答1:


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?



来源:https://stackoverflow.com/questions/17075147/phpsessid-cookie-over-webclient-doesnt-work

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!