java - How to identify Web request from PDA/Desktop/Server? -
i know if possible identify (with java) kind of computer used make request, example: server, desktop, pda (tablet,cellphone,etc)?
thank you!
yes degree. have user-agent string http request. how depend on java , framework implementation that's direction should take. have examin string browser versions, mobile, etc...
here request mac:
mozilla/5.0 (macintosh; intel mac os x 10_7_5) applewebkit/536.30.1 (khtml, gecko) version/6.0.5 safari/536.30.1
and here windows server:
mozilla/5.0 (compatible; msie 9.0; windows nt 6.1; wow64; trident/5.0)
and here iphone:
mozilla/5.0 (iphone; cpu iphone os 6_1_3 mac os x) applewebkit/536.26 (khtml, gecko) version/6.0 mobile/10b329 safari/8536.25
Comments
Post a Comment