1. sayfa (Toplam 1 sayfa)

Kullanıcının kullandığı browseri bulalım

Gönderilme zamanı: 19 Eki 2007, 15:21
gönderen velociraptor

Kod: Tümünü seç

<%
StrBrws = Request.ServerVariables("HTTP_USER_AGENT")

If Instr(StrBrowser, "MSIE") Then
If Instr(StrBrws, "MSIE 5.") Then
StrBrowser = "Microsoft Internet Explorer 5.x"
Elseif Instr(StrBrws, "MSIE 4.") Then
StrBrowser = "Microsoft Internet Explorer 4.x"
Elseif Instr(StrBrws, "MSIE 3.") Then
StrBrowser = "Microsoft Internet Explorer 3.x"
If Instr(StrBrws, "MSIE 3.02") Then
StrBrowser = "Microsoft Internet Explorer 3.02"
End If
Else
StrBrowser = "Microsoft Internet Explorer"
End If
ElseIf Instr(StrBrws, "Mozilla") and Instr(StrBrws, "compatible") = 0 Then
If Instr(StrBrws, "Mozilla/4") Then
StrBrowser = "Netscape Navigator 4.x"
Elseif Instr(StrBrws, "Mozilla/3") Then
StrBrowser = "Netscape Navigator 3.x"
Else
StrBrowser = "Netscape Navigator"
End If
End If
%>
kullanimi:
<% Response.write StrBrowser %>

ALINTIDIR

Gönderilme zamanı: 19 Eki 2007, 15:38
gönderen drog_1
tesekürler...