<%= ASP総合 %> Part.4at PHP
<%= ASP総合 %> Part.4 - 暇つぶし2ch482:nobodyさん
06/05/01 22:53:52
こうか?適当。ノーチェック。

function UserAgent(userAgent)
dim platform,agetPart,browser,regex,omatches,omatch
dim browserV,platformV
if instr(Ucase(userAgent),"DOCOMO") > 0 then
platform = "DoCoMo"
agetPart = split(userAgent,"/")
browser = "DoCoMo"
if instr(agetPart(0),"(") > 0 then
set regex = new RegExp
regex.pattern = "([0-9]\.[0-9])\s([^\(]*)(.*)"
set omatches = regex.execute(agetPart(0))
set omatch = omatches(0)
browserV = omatch.submatches(0)
platformV = omatch.submatches(1)
else
browserV = agetPart(0)
platformV = agetPart(1)
end if
end if
UserAgent = array(platform, platformV, browser, browserV)
end function



次ページ
最新レス表示
レスジャンプ
類似スレ一覧
スレッドの検索
話題のニュース
おまかせリスト
オプション
しおりを挟む
スレッドに書込
スレッドの一覧
暇つぶし2ch