It is necessary to go to the browser from a program written in C ++ Builder. First, I log in on the page I plan to go to:
TStringList *SL = new TStringList; IdHTTP1->HandleRedirects =True; IdHTTP1->CookieManager = IdCookieManager1; IdHTTP1->AllowCookies = true; String Url = "http://host/auth"; SL->Add("login=login"); SL->Add("password=password"); try { Memo1->Text = IdHTTP1->Post(Url, SL); ShellExecute(Handle, L"open", L"http://host/auth", NULL, NULL, SW_SHOW); } catch(EIdException &E) { ShowMessage("Ошибка:\n" + E.Message + ""); }; delete SL;
After authorization, I get the html code of the page I need, which is displayed in the memo.
Question: How to open a page on which my authorization has already passed in the browser? Or how to make the browser understand that the final page opens an already authorized client?