I'm using a full-width, we're changing to half-width.
Not my original
Some of the learning tutorials are mostly simple introduction
. NET version
<% @Page language= "C #" debug= "true"%>
<% @Import namespace= "System"%>
<% @Import namespace= "System.Drawing"%>
<% @Import namespace= "System.IO"%>
<%
String sreferer=request.servervariables["Http_referer"];
String Slanguage,sbrowser,ssys;
if (request.servervariables["Http_accept_language"]. IndexOf ("ZH-CN") >=0) {
Slanguage= "Chinese";
}
Else
{
slanguage=request.servervariables["Http_accept_language"];
}
String[] auseragent=request.servervariables["Http_user_agent"]. Split (';');
if (auseragent.length>2) {
SBROWSER=AUSERAGENT[1]. Replace ("MSIE", "Internet Explorer"). Trim ();
if (sbrowser== "U") {
Sbrowser= "Mozilla";
}
SSYS=AUSERAGENT[2]. Replace (")", "");
Ssys=ssys.replace ("NT 5.2", "2003");
Ssys=ssys.replace ("NT 5.1", "XP");
Ssys=ssys.replace ("NT 5.0", "2000");
Ssys=ssys.replace ("9x", "Me"). Trim ();
}
Else
{
Sbrowser= "Unknown";
ssys= "Unknown";
}
int nwidth=260,nheight=90;
Bitmap image=new Bitmap (nwidth,nheight);
Graphics g=graphics.fromimage (image);
Stream imgdata=new MemoryStream ();
G.clear (Color.snow);
G.drawrectangle (pens.black,0,0,nwidth-1,nheight-1);
g.DrawString ("Your IP:" request.servervariables["REMOTE_ADDR"],new Font ("Courier new", 9,fontstyle.bold), new SolidBrush (Color.FromArgb (200, 14, 91)), 6,6);
g.DrawString ("Language:" Slanguage,new Font ("Courier new", 9,fontstyle.bold), New SolidBrush (Color.FromArgb (0, 0, 0)), 6,26);
g.DrawString ("Your OS:" Ssys,new Font ("Courier new", 9,fontstyle.bold), New SolidBrush (Color.FromArgb (0,0,255)), 6,46) ;
g.DrawString ("Browser:" Sbrowser,new Font ("Courier new", 9,fontstyle.bold), New SolidBrush (Color.FromArgb (0, 160, 0)), 6,66);
G.dispose ();
Response.contenttype= "Image/gif";
Image. Save (Response.outputstream, System.Drawing.Imaging.ImageFormat.Gif);
%>
PHP version
http://www.bkjia.com/PHPjc/631977.html www.bkjia.com true http://www.bkjia.com/PHPjc/631977.html techarticle I use the full-width, we modify the half-angle is not my original and some of the learning tutorials are mostly simple introduction. NET version% @Page language=c# debug=true%% @Import namespace=system% ...