Otto wrote:Heuristic device detection (Harbour)
FUNCTION DetectDeviceType( cUserAgent ) LOCAL cUA LOCAL cDevice := "desktop" IF Empty( cUserAgent ) RETURN cDevice ENDIF cUA := Lower( cUserAgent ) // Mobile phones IF "mobile" $ cUA .OR. ; "android" $ cUA .OR. ; "iphone" $ cUA cDevice := "mobile" ENDIF // Tablets (check after mobile) IF "ipad" $ cUA .OR. ; "tablet" $ cUA cDevice := "tablet" ENDIF RETURN cDeviceImportant:
this is not a reliable detection
it is only a heuristic estimation
the server sees only text (the User-Agent)
everything else is interpretation
Muchas gracias Otto,
Lo tendré en cuenta.
Un Saludo
Carlos G.
FiveWin 25.12 + Harbour 3.2.0dev (r2502110321), BCC 7.7 Windows 11 Home