vb.net-------------------------------------------------------------------------------------------------------------------------------------
Dim ServerInfo As System.Environment
'Dim url As String = Request.Url ' 獲取有關當前請求的 URL 的信息。
'Dim urlReferrer As String = Request.UrlReferrer '獲取有關客戶端上次請求的 URL 的信息,該請求鏈接到當前的 URL。
Dim useragent As String = Request.UserAgent '獲取客戶端瀏覽器的原始用戶代理信息。
Dim userhostaddress As String = Request.UserHostAddress '獲取遠程客戶端的 IP 主機地址。
Dim userhostname As String = Request.UserHostName '獲取遠程客戶端的 DNS 名稱。
'Dim userlanguages As String = Request.UserLanguages
Dim platform As String = Request.Browser.Platform
Label1.Text = "系統版本:" & ServerInfo.OSVersion.ToString
Label6.Text = "系統目錄:" & ServerInfo.SystemDirectory
Label2.Text = "用戶名稱:" & ServerInfo.UserName
Label3.Text = "計算機名:" & ServerInfo.MachineName
Label4.Text = "瀏覽器版本:" & Request.Browser.Type
Label5.Text = "COOKIES狀態:" & Request.Browser.Cookies
Label7.Text = "瀏覽器代理信息:" & useragent
Label8.Text = "您的IP地址:" & userhostaddress
Label9.Text = "DNS名稱:" & userhostname
Label10.Text = "系統平臺:" & platform
--------------------------------------------------------------c#---------------------------------------------------------
System.Environment ServerInfo;
string useragent = Request.UserAgent;
string userhostaddress = Request.UserHostAddress;
string userhostname = Request.UserHostName;
string platform = Request.Browser.Platform;
Label1.Text = "系統版本:" + ServerInfo.OSVersion.ToString;
Label6.Text = "系統目錄:" + ServerInfo.SystemDirectory;
Label2.Text = "用戶名稱:" + ServerInfo.UserName;
Label3.Text = "計算機名:" + ServerInfo.MachineName;
Label4.Text = "瀏覽器版本:" + Request.Browser.Type;
Label5.Text = "COOKIES狀態:" + Request.Browser.Cookies;
Label7.Text = "瀏覽器代理信息:" + useragent;
Label8.Text = "您的IP地址:" + userhostaddress;
Label9.Text = "DNS名稱:" + userhostname;
Label10.Text = "系統平臺:" + platform;