hi
i need to read html from a url requiring that i log in to the site.
how is that done? i think it depends on how the site is build?
its for a torrent site, and they often use the same template as far as i know.
the site im trying to read through c# is http://nordic-t.org/browse.php
this code works fine for getting any page, that doesnt require login:
// Address of URL
string URL = textBox1.Text;
try
{
// Get HTML data
WebClient client = new WebClient();
Stream data = client.OpenRead(URL);
StreamReader reader = new StreamReader(data);
string str = "";
str = reader.ReadLine();
while (str != null)
{
richTextBox1.AppendText(str);
str = reader.ReadLine();
}
data.Close();
}
catch (WebException exp)
{
MessageBox.Show(exp.Message, "Exception");
}
how do i merge username and password into all this?
i searched, but didnt find anything for doing it with a page using php. maybe i searched for the wrong things.. still kinda newbie with programming :)