I'm using a full angle, and we're changing it to half a corner.
Not my original
Some of the other learning tutorials are briefly introduced
. 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