Salve, io ho un sito che permette l'accesso ai cellulari in modo automatico riconoscendo il cliente in base alle stringhe user-agent.
Il controllo viene fatto attraverso una serie di IF e di OR ma ormai la lista si sta molto allungando perciò cheido a voi se magaria sia opportuno usare degli array o quale altra soluzione.
Mi potete dare eventualmente una soluzione, io sarei orientato agli array.
Vi riporto l'elenco completo degli user-agent presenti nella mia lista e lascio a voi eventualmente la soluzione con array.
È possibile anche una soluzione che memorizzi tutti in MySQL? e se si come? Ringrazio sin d'ora.
<%
set userAgent = Request.ServerVariables("HTTP_USER_AGENT")
'VERSIONE UMTS
evolution = InStr(userAgent, "Hutc3G")
evolution = evolution OR InStr(userAgent, "LG/U8100")
evolution = evolution OR InStr(userAgent, "LG/U8110")
evolution = evolution OR InStr(userAgent, "LG/U8120")
evolution = evolution OR InStr(userAgent, "LG/U8130")
evolution = evolution OR InStr(userAgent, "LG/U8138")
evolution = evolution OR InStr(userAgent, "LG/U8150")
evolution = evolution OR InStr(userAgent, "LG/U8180")
evolution = evolution OR InStr(userAgent, "LG/U8380")
evolution = evolution OR InStr(userAgent, "MOT-A835")
evolution = evolution OR InStr(userAgent, "MOT-A845")
evolution = evolution OR InStr(userAgent, "MOT-A925")
evolution = evolution OR InStr(userAgent, "MOT-C975")
evolution = evolution OR InStr(userAgent, "MOT-C980")
evolution = evolution OR InStr(userAgent, "MOT-V975")
evolution = evolution OR InStr(userAgent, "MOT-V980")
evolution = evolution OR InStr(userAgent, "MOT-A1000")
evolution = evolution OR InStr(userAgent, "MOT-E1000")
evolution = evolution OR InStr(userAgent, "MOT-E1050")
evolution = evolution OR InStr(userAgent, "MOT-V1050")
evolution = evolution OR InStr(userAgent, "MOT-E1060")
evolution = evolution OR InStr(userAgent, "MOT-E1120")
evolution = evolution OR InStr(userAgent, "MOT-E1150")
evolution = evolution OR InStr(userAgent, "MOT-V6")
evolution = evolution OR InStr(userAgent, "NEC-e616")
evolution = evolution OR InStr(userAgent, "NEC-c616")
evolution = evolution OR InStr(userAgent, "NEC-e313")
evolution = evolution OR InStr(userAgent, "NEC-c228")
evolution = evolution OR InStr(userAgent, "NEC-e228")
evolution = evolution OR InStr(userAgent, "NEC-e338")
evolution = evolution OR InStr(userAgent, "NEC-802")
evolution = evolution OR InStr(userAgent, "NEC-N900iG")
evolution = evolution OR InStr(userAgent, "Nokia7600")
evolution = evolution OR InStr(userAgent, "Nokia6650")
evolution = evolution OR InStr(userAgent, "Nokia6630")
evolution = evolution OR InStr(userAgent, "Nokia6330")
evolution = evolution OR InStr(userAgent, "Nokia6680")
evolution = evolution OR InStr(userAgent, "SAMSUNG-SGH-Z105U")
evolution = evolution OR InStr(userAgent, "SAMSUNG-SGH-Z107")
evolution = evolution OR InStr(userAgent, "SAMSUNG-SGH-Z110")
evolution = evolution OR InStr(userAgent, "SonyEricssonZ1010")
evolution = evolution OR InStr(userAgent, "SonyEricssonV800")
evolution = evolution OR InStr(userAgent, "SonyEricssonZ800")
evolution = evolution OR InStr(userAgent, "SHARP-TQ-802")
evolution = evolution OR InStr(userAgent, "SHARP-TQ-902")
'ACCESSO CELLULARI UMTS NON IN ELENCO
evolution = evolution OR request.querystring("evolution") = "1"
'VERSIONE LIGHT
light = InStr(userAgent, "N223i")
light = light OR InStr(userAgent, "N341i")
light = light OR InStr(userAgent, "N410i")
light = light OR InStr(userAgent, "N331i")
light = light OR InStr(userAgent, "N400i")
light = light OR InStr(userAgent, "Panasonic-P341i")
light = light OR InStr(userAgent, "M341i")
light = light OR InStr(userAgent, "M342i")
light = light OR InStr(userAgent, "M340i")
light = light OR InStr(userAgent, "portalmmm")
light = light OR InStr(userAgent, "MOT-E378i")
light = light OR InStr(userAgent, "MOT-E398")
light = light OR InStr(userAgent, "MOT-V547")
light = light OR InStr(userAgent, "MOT-V550")
light = light OR InStr(userAgent, "Panasonic-X200")
light = light OR InStr(userAgent, "Panasonic-EB-X400")
light = light OR InStr(userAgent, "Panasonic-X60")
light = light OR InStr(userAgent, "Panasonic-X701")
light = light OR InStr(userAgent, "SonyEricssonT610")
light = light OR InStr(userAgent, "SonyEricssonF500i")
light = light OR InStr(userAgent, "SonyEricssonP800")
light = light OR InStr(userAgent, "SonyEricssonP900")
light = light OR InStr(userAgent, "Nokia3650")
light = light OR InStr(userAgent, "Nokia6310")
'ACCESSO CELLULARI LIGHT NON IN ELENCO
light = light OR request.querystring("light") = "1"
' browser WEB
pc = InStr(userAgent, "MSIE")
pc = pc OR InStr(userAgent, "Opera")
pc = pc OR InStr(userAgent, "Mozilla")
pc = pc OR InStr(userAgent, "ot")
pc = pc OR InStr(userAgent, "Java")
pc = pc OR InStr(userAgent, "Schmozilla")
%>