Demo:
Http://www.aspxboy.com/demo/286.aspx
CodeHightlight in source code Viewer)
Http://www.aspxboy.com/code/default.aspx/S7s2zPJbeI9PJA/ OK
Hpavwvauehf02egeogeb3yd5z7fll3zngdv7xiqertuoym9kbq62
Lshbjbwvwpbbya4eyvmhvmhyedph8chu5ornn8 =. aspx
<% @ Page Language = "C #" trace = "true" %>
<% @ Import namespace = "system. Net" %>
<% @ Import namespace = "system. Io" %>
<HTML>
<Head>
<SCRIPT runat = "server">
Void page_load (Object sender, eventargs e ){
Webrequest Req = webrequest. Create ("http://www.im286.com/index.php ");
String urliii = "src ="; // use absolute link for the image
Urliii + = "http://www.im286.com /";
Try {
Webresponse result = Req. getresponse ();
Stream receivestream = result. getresponsestream ();
Byte [] READ = new byte [512];
Int bytes = receivestream. Read (read, 0,512 );
Lblhtml. Text = "";
While (Bytes> 0)
{
// Note:
// Assume that the response uses gb2312 as the encoding method.
// If the content is sent in the form of an ANSI code page (for example, 932), use a statement similar to the following:
// Encoding encode = system. Text. encoding. getencoding ("shift-JIS ");
Encoding encode = system. Text. encoding. getencoding ("gb2312 ");
Lblhtml. Text = lblhtml. Text + encode. getstring (read, 0, bytes );
Bytes = receivestream. Read (read, 0,512 );
}
} Catch (exception ){
Lblhtml. Text = "page retrieval error ";
}
Lblhtml. Text = lblhtml. Text. Replace ("src =", "" + urliii + "");
Lblhtml. Text = lblhtml. Text. Replace ("\"","");
}
</SCRIPT>
</Head>
<Body>
<Form method = "Post" Action = "webrequest. aspx" runat = "server">
<Asp: Label runat = server id = "lblhtml" rows = "30" Cols = "80" enableviewstate = "false" Wrap = "true"> </ASP: Label>
</Form>
</Body>
</Html>