Asp ile ziyaretçi tarayıcısı bulmak
Asp fonksiyonu kullanarak sayfanızı ziyaret eden ziyaretçilerinizin kullandığı çeşitli web tarayıcılarını tespit edebilir ve bunu yazdırabilirsiniz. Bunun için gerekli olan kodumuza aşağıdadır.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 |
<% Function BrowserType() strTarayici = Request.ServerVariables("HTTP_USER_AGENT") '// Opera If InStr(1, strTarayici, "Opera 1", 1) > 0 Then strKullanilanTarayici = "Opera 1" ElseIf InStr(1, strTarayici, "Opera 2", 1) > 0 Then strKullanilanTarayici = "Opera 2" ElseIf InStr(1, strTarayici, "Opera 3", 1) > 0 Then strKullanilanTarayici = "Opera 3" ElseIf InStr(1, strTarayici, "Opera 4", 1) > 0 Then strKullanilanTarayici = "Opera 4" ElseIf InStr(1, strTarayici, "Opera 5", 1) > 0 Then strKullanilanTarayici = "Opera 5" ElseIf InStr(1, strTarayici, "Opera 6", 1) > 0 Then strKullanilanTarayici = "Opera 6" ElseIf InStr(1, strTarayici, "Opera 7", 1) > 0 Then strKullanilanTarayici = "Opera 7" ElseIf InStr(1, strTarayici, "Opera 8", 1) > 0 Then strKullanilanTarayici = "Opera 8" ElseIf InStr(1, strTarayici, "Opera", 1) > 0 Then strKullanilanTarayici = "Opera" '// AOL ElseIf inStr(1, strTarayici, "AOL 3", 1) > 0 Then strKullanilanTarayici = "AOL 3" ElseIf inStr(1, strTarayici, "AOL 4", 1) > 0 Then strKullanilanTarayici = "AOL 4" ElseIf inStr(1, strTarayici, "AOL 5", 1) > 0 Then strKullanilanTarayici = "AOL 5" ElseIf inStr(1, strTarayici, "AOL 6", 1) > 0 Then strKullanilanTarayici = "AOL 6" ElseIf inStr(1, strTarayici, "AOL 7", 1) > 0 Then strKullanilanTarayici = "AOL 7" ElseIf inStr(1, strTarayici, "AOL 8", 1) > 0 Then strKullanilanTarayici = "AOL 8" ElseIf inStr(1, strTarayici, "AOL 9", 1) > 0 Then strKullanilanTarayici = "AOL 9" ElseIf inStr(1, strTarayici, "AOL", 1) > 0 Then strKullanilanTarayici = "AOL" '// Konqueror ElseIf inStr(1, strTarayici, "Konqueror", 1) > 0 Then strKullanilanTarayici = "Konqueror" '// EudoraWeb ElseIf inStr(1, strTarayici, "EudoraWeb", 1) > 0 Then strKullanilanTarayici = "EudoraWeb" '// Dreamcast ElseIf inStr(1, strTarayici, "Dreamcast", 1) > 0 Then strKullanilanTarayici = "Dreamcast" '// Safari ElseIf inStr(1, strTarayici, "Safari", 1) > 0 Then strKullanilanTarayici = "Safari" '// Lynx ElseIf inStr(1, strTarayici, "Lynx", 1) > 0 Then strKullanilanTarayici = "Lynx" '// ICE ElseIf inStr(1, strTarayici, "ICE", 1) > 0 Then strKullanilanTarayici = "ICE" '// iCab ElseIf inStr(1, strTarayici, "iCab", 1) > 0 Then strKullanilanTarayici = "iCab" '// HotJava ElseIf inStr(1, strTarayici, "Sun", 1) > 0 AND inStr(1, strTarayici, "Mozilla/3", 1) > 0 Then strKullanilanTarayici = "HotJava" '// Galeon ElseIf inStr(1, strTarayici, "Galeon", 1) > 0 Then strKullanilanTarayici = "Galeon" '// Epiphany ElseIf inStr(1, strTarayici, "Epiphany", 1) > 0 Then strKullanilanTarayici = "Epiphany" '// DocZilla ElseIf inStr(1, strTarayici, "DocZilla", 1) > 0 Then strKullanilanTarayici = "DocZilla" '// Camino ElseIf inStr(1, strTarayici, "Chimera", 1) > 0 OR inStr(1, strTarayici, "Camino", 1) > 0 Then strKullanilanTarayici = "Camino" '// Dillo ElseIf inStr(1, strTarayici, "Dillo", 1) > 0 Then strKullanilanTarayici = "Dillo" '// amaya ElseIf inStr(1, strTarayici, "amaya", 1) > 0 Then strKullanilanTarayici = "Amaya" '// NetCaptor ElseIf inStr(1, strTarayici, "NetCaptor", 1) > 0 Then strKullanilanTarayici = "NetCaptor" '// Arama Motoru Robotları '// LookSmart ElseIf inStr(1, strTarayici, "ZyBorg", 1) > 0 Then strKullanilanTarayici = "LookSmart" '// Googlebot ElseIf inStr(1, strTarayici, "Googlebot", 1) > 0 Then strKullanilanTarayici = "Googlebot" '// MSN ElseIf inStr(1, strTarayici, "msnbot", 1) > 0 Then strKullanilanTarayici = "MSN" '// inktomi ElseIf inStr(1, strTarayici, "slurp", 1) > 0 Then strKullanilanTarayici = "Inktomi" '// AltaVista ElseIf inStr(1, strTarayici, "Scooter", 1) > 0 Then strKullanilanTarayici = "AltaVista" '// DMOZ ElseIf inStr(1, strTarayici, "Robozilla", 1) > 0 Then strKullanilanTarayici = "DMOZ" '// Ask Jeeves ElseIf inStr(1, strTarayici, "Ask Jeeves", 1) > 0 OR inStr(1, strTarayici, "Ask+Jeeves", 1) > 0 Then strKullanilanTarayici = "Ask Jeeves" '// Lycos ElseIf inStr(1, strTarayici, "lycos", 1) > 0 Then strKullanilanTarayici = "Lycos" '// Excite ElseIf inStr(1, strTarayici, "ArchitextSpider", 1) > 0 Then strKullanilanTarayici = "Excite" '// Northernlight ElseIf inStr(1, strTarayici, "Gulliver", 1) > 0 Then strKullanilanTarayici = "Northernlight" '// AllTheWeb ElseIf inStr(1, strTarayici, "crawler@fast", 1) > 0 Then strKullanilanTarayici = "AllTheWeb" '// Turnitin ElseIf inStr(1, strTarayici, "TurnitinBot", 1) > 0 Then strKullanilanTarayici = "Turnitin" '// InternetSeer ElseIf inStr(1, strTarayici, "internetseer", 1) > 0 Then strKullanilanTarayici = "InternetSeer" '// NameProtect Inc. ElseIf inStr(1, strTarayici, "nameprotect", 1) > 0 Then strKullanilanTarayici = "NameProtect" '// PhpDig ElseIf inStr(1, strTarayici, "PhpDig", 1) > 0 Then strKullanilanTarayici = "PhpDig" '// Rambler ElseIf inStr(1, strTarayici, "StackRambler", 1) > 0 Then strKullanilanTarayici = "Rambler" '// UbiCrawler ElseIf inStr(1, strTarayici, "UbiCrawler", 1) > 0 Then strKullanilanTarayici = "UbiCrawler" '// entireweb ElseIf inStr(1, strTarayici, "Speedy+Spider", 1) > 0 Then strKullanilanTarayici = "entireweb" '// Alexa.com ElseIf inStr(1, strTarayici, "ia_archiver", 1) > 0 Then strKullanilanTarayici = "Alexa" '// Arianna/Libero ElseIf inStr(1, strTarayici, "arianna.libero.it", 1) > 0 Then strKullanilanTarayici = "Arianna/Libero" '// Internet Explorer ElseIf inStr(1, strTarayici, "MSIE 7", 1) > 0 Then strKullanilanTarayici = "Microsoft Internet Explorer 7" ElseIf inStr(1, strTarayici, "MSIE 6", 1) > 0 Then strKullanilanTarayici = "Microsoft Internet Explorer 6" ElseIf inStr(1, strTarayici, "MSIE 5", 1) > 0 Then strKullanilanTarayici = "Microsoft Internet Explorer 5" ElseIf inStr(1, strTarayici, "MSIE 4", 1) > 0 Then strKullanilanTarayici = "Microsoft Internet Explorer 4" ElseIf inStr(1, strTarayici, "MSIE 3", 1) > 0 Then strKullanilanTarayici = "Microsoft Internet Explorer 3" ElseIf inStr(1, strTarayici, "MSIE 2", 1) > 0 Then strKullanilanTarayici = "Microsoft Internet Explorer 2" ElseIf inStr(1, strTarayici, "MSIE 1", 1) > 0 Then strKullanilanTarayici = "Microsoft Internet Explorer 1" '// Pocket Internet Explorer ElseIf inStr(1, strTarayici, "MSPIE 1", 1) > 0 Then strKullanilanTarayici = "Pocket IE 1" ElseIf inStr(1, strTarayici, "MSPIE 1", 1) > 0 Then strKullanilanTarayici = "Pocket IE 2" '// Mozilla Firefox ElseIf inStr(1, strTarayici, "Gecko", 1) > 0 AND inStr(1, strTarayici, "Firefox", 1) > 0 Then strKullanilanTarayici = "Mozilla Firefox" '// Mozilla Firebird ElseIf inStr(1, strTarayici, "Gecko", 1) > 0 AND inStr(1, strTarayici, "Firebird", 1) > 0 Then strKullanilanTarayici = "Mozilla Firebird" '// Mozilla ElseIf inStr(1, strTarayici, "Gecko", 1) > 0 AND inStr(1, strTarayici, "rv:2", 1) > 0 AND inStr(1, strTarayici, "Netscape", 1) = 0 Then strKullanilanTarayici = "Mozilla 2" ElseIf inStr(1, strTarayici, "Gecko", 1) > 0 AND inStr(1, strTarayici, "rv:1", 1) > 0 AND inStr(1, strTarayici, "Netscape", 1) = 0 Then strKullanilanTarayici = "Mozilla 1" ElseIf inStr(1, strTarayici, "Gecko", 1) > 0 AND inStr(1, strTarayici, "rv:0", 1) > 0 AND inStr(1, strTarayici, "Netscape", 1) = 0 Then strKullanilanTarayici = "Mozilla" '// Netscape ElseIf inStr(1, strTarayici, "Netscape/8", 1) > 0 Then strKullanilanTarayici = "Netscape 8" ElseIf inStr(1, strTarayici, "Netscape/7", 1) > 0 Then strKullanilanTarayici = "Netscape 7" ElseIf inStr(1, strTarayici, "Netscape6", 1) > 0 Then strKullanilanTarayici = "Netscape 6" ElseIf inStr(1, strTarayici, "Mozilla/4", 1) > 0 Then strKullanilanTarayici = "Netscape 4" ElseIf inStr(1, strTarayici, "Mozilla/3", 1) > 0 Then strKullanilanTarayici = "Netscape 3" ElseIf inStr(1, strTarayici, "Mozilla/2", 1) > 0 Then strKullanilanTarayici = "Netscape 2" ElseIf inStr(1, strTarayici, "Mozilla/1", 1) > 0 Then strKullanilanTarayici = "Netscape 1" '// Hiçbiri Değilse Else strKullanilanTarayici = "bilinmiyor" End If BrowserType = strKullanilanTarayici End Function %> |
Kullanımı:
1 |
<%=BrowserType %> |