/// <Summary>
/// Input the URL to return the HTML of the webpage Code
/// </Summary>
/// <Param name = "url"> URL </param>
/// <Returns> </returns>
Public static string geturltohtml (string URL)
{
Errormsg = "";
Try
{
System. net. webrequest wreq = system. net. webrequest. Create (URL );
// Get the response instance.
System. net. webresponse wresp = wreq. getresponse ();
// Read an http-Specific Property
// If (wresp. GetType () = httpwebresponse)
//{
// Datetime updated = (system. net. httpwebresponse) wresp). lastmodified;
//}
// Get the response stream.
System. Io. Stream respstream = wresp. getresponsestream ();
// Dim reader as streamreader = new streamreader (respstream)
System. Io. streamreader reader = new system. Io. streamreader (respstream, system. Text. encoding. getencoding ("gb2312 "));
Return reader. readtoend ();
}
Catch (system. Exception ex)
{
Errormsg = ex. message;
}
Return "";
}
You can use this token to obtain the HTML code of the client on the web page, and then save it to The. html file.