We Recommend

ASP.NET 3.5 Unleashed ASP.NET 3.5 Unleashed
ASP.NET 3.5 Unleashed is the most comprehensive book available on the Microsoft ASP.NET 3.5 Framework, covering all aspects of the ASP.NET 3.5 Framework--no matter how advanced.


Posted By

krisdb on 06/29/07


Tagged

ASP


Versions (?)


getOS


Published in: ASP 


  1. function getOS()
  2. dim sOS: sOS = Request.ServerVariables("HTTP_USER_AGENT")
  3.  
  4. if (instr(lcase(sOS),lcase("windows")) > 0) then
  5. getOS = "windows"
  6. elseif (instr(lcase(sOS),lcase("mac")) > 0) then
  7. getOS = "mac"
  8. elseif (instr(lcase(sOS),lcase("mac")) > 0) then
  9. getOS = "linux"
  10. elseif (instr(lcase(sOS),lcase("windows ce")) > 0) then
  11. getOS = "pocketpc"
  12. elseif (instr(lcase(sOS),lcase("palm")) > 0) then
  13. getOS = "palm"
  14. end if
  15. end function

Report this snippet 

You need to login to post a comment.