PHP tarafından istemci tarafı OS nasıl öğrenebilirim

2 Cevap php

PHP ve JavaScript hangi işlevi biz son kullanıcının bir siteyi kullanan son kullanıcılar işletim sistemi ne biliyorsunuz?

2 Cevap

Bir up-to-date browscap.ini, sen get_browser() php işlevini kullanabilirsiniz ile.

Javascript tabanlı algılama için, this script quirksmode.org check out

Javascript:

navigator.platform gives you a general idea (win32 for example). navigator.userAgent can be parsed with this regex: /^[^\(]*\((.*)]\)/ to give you what's in the first set of parentheses. This typically is split up into more sub-sections, for example:

"Windows; U; Windows NT 6.0; en-US; rv:1.9.1.3pre"

Zytrax useragents harika bir listesini tutar.

PHP:

browser.php OS, Tarayıcı, ve Tarayıcı sürümü içine kullanıcı ajanı ayrıştırır:

Olursa olsun bunu tespit nasıl, bu sahte olabilir ki olsa tutun.