Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - User’s CPU
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

User’s CPU

 Post Reply Post Reply
Author
zMaestro View Drop Down
Senior Member
Senior Member


Joined: 11 May 2003
Location: Egypt
Status: Offline
Points: 1183
Post Options Post Options   Thanks (0) Thanks(0)   Quote zMaestro Quote  Post ReplyReply Direct Link To This Post Topic: User’s CPU
    Posted: 11 May 2003 at 2:53pm

Is there a way I can know the Processor of my web page visitor? just for collecting statisics

I read in an IBM book a ServerVariable that can do the job but didn't work:

 

HTTP_UA_CPU (I.E. 3+ only) Client's computer CPU type.

can anyone help



Edited by zMaestro
Back to Top
MadDog View Drop Down
Mod Builder Group
Mod Builder Group
Avatar

Joined: 01 January 2002
Status: Offline
Points: 3008
Post Options Post Options   Thanks (0) Thanks(0)   Quote MadDog Quote  Post ReplyReply Direct Link To This Post Posted: 11 May 2003 at 3:51pm

Ive never heard of any coding type getting the comps info (like cpu and ram). You would have to have like an ActiveX script to do that.

Back to Top
michael View Drop Down
Senior Member
Senior Member
Avatar

Joined: 08 April 2002
Location: United States
Status: Offline
Points: 4670
Post Options Post Options   Thanks (0) Thanks(0)   Quote michael Quote  Post ReplyReply Direct Link To This Post Posted: 11 May 2003 at 4:20pm
You are corrent this servervariable does exit but it has been taken off from MS since IE 4.x, and it was only reported with IE anyway so netscape etc users would always be blank. You could theoretically use a javascript function which is extremely in-accurate though. It all depends on cpu, ram, load etc. but you might wanna use it as a benchmark.
function test_cpu(force){
var d=doc;dc=d.cookie,dcr=/CpuSpeed=([^;]+);/,r=dcr.exec(dc)

if (r&&!force){
  mhz = r[1]
} else {
  var average,t1,t2,t,l,report=0,passes,offset=d.all?110:150

  passes = 40

  for (l=0;l<passes;l++){
   t1 = new Date().getTime()
   for (t=0;t<20000;t++){}
   t2 = new Date().getTime()
   report += t2-t1
  }
  average = report/passes

  mhz = parseInt((65/average)*offset)
  d.cookie = 'CpuSpeed=' + mhz + ';'
} return mhz
}
Back to Top
zMaestro View Drop Down
Senior Member
Senior Member


Joined: 11 May 2003
Location: Egypt
Status: Offline
Points: 1183
Post Options Post Options   Thanks (0) Thanks(0)   Quote zMaestro Quote  Post ReplyReply Direct Link To This Post Posted: 11 May 2003 at 4:22pm

I read this in an IBM Training book.

ProsoftTraining.com
Active Server Pages
Appendix-10
Version 2.17

 



Edited by zMaestro
Back to Top
michael View Drop Down
Senior Member
Senior Member
Avatar

Joined: 08 April 2002
Location: United States
Status: Offline
Points: 4670
Post Options Post Options   Thanks (0) Thanks(0)   Quote michael Quote  Post ReplyReply Direct Link To This Post Posted: 11 May 2003 at 6:09pm
Well if they still tech that the book is obsolete.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.