Login to website redirect to url and get htmlsource of new page?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP



Login to website redirect to url and get htmlsource of new page?



I'm trying to get html source after login a website with a userdata, but It doesn't give me html source of the new page It gives me login page htmlsource. So where is the problem in my source code?On the website it redirects me to a server select page after login "lobby.ogame.gameforge.com/?language=tr"; I'm trying to get html source of this page.



And this is my code;


public void button1_Click(object sender, EventArgs e)

string URI = "https://tr.ogame.gameforge.com/";
string myParameters = "login=testusername&pass=testpassword";

using (WebClient wc = new WebClient())

wc.Headers[HttpRequestHeader.ContentType] = "application/x-www-form-urlencoded";
string HtmlResult = wc.UploadString(URI, myParameters);
richTextBox1.Text = HtmlResult;






Username and password are not sent via URL parameters to log you into a website. If they ever are, then I guarantee that's a site you don't want to be at.
– Marathon55
Aug 7 at 19:37






So how i should make it ? @Marathon55
– Fath Sbbd
Aug 7 at 19:39





Try something similar to the code in this answer
– Marathon55
Aug 9 at 17:08









By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

Firebase Auth - with Email and Password - Check user already registered

Dynamically update html content plain JS

How to determine optimal route across keyboard