Answer the question
In order to leave comments, you need to log in
How to login to nginx server?
I'm trying to log into the site:
cookieContainer = new CookieContainer();
request = (HttpWebRequest)WebRequest.Create("http://biblioclub.ru/index.php?page=book&id=440612");
request.CookieContainer = cookieContainer;
request.PreAuthenticate = true;
string username = "логин";
string password = "пароль";
string encoded = Convert.ToBase64String(Encoding.GetEncoding("ISO-8859-1").GetBytes(username + ":" + password));
request.Headers.Add("Authorization", "Basic " + encoded);
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
Console.WriteLine(response.Headers);
StreamReader reader = new StreamReader(response.GetResponseStream());
Console.WriteLine("Status: " + response.StatusCode.ToString());
Getting links from Excel ended
Transfer-Encoding: chunked
Connection: keep-alive
Keep-Alive: timeout=30
Pragma: no-cache
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Content-Type: text/html; charset=utf-8
Date: Tue, 12 May 2020 06:31:14 GMT
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Set-Cookie: PHPSESSID=blvjismv657krchki27b2bls25; expires=Thu, 11-Jun-2020 06:31:14 GMT; Max-Age=2592000; path=/
Server: nginx
X-Powered-By: PHP/5.6.36-1+ubuntu16.04.1+deb.sury.org+1
Answer the question
In order to leave comments, you need to log in
There is a good fiddler2 tool that allows you to record the entire session. Just set it as a proxy server.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question