javascript - how to get hard disk serial number with php on localhost - Stack Overflow

is there a way i can get hard disk serial number or machine serial number with php or javascript on loc

is there a way i can get hard disk serial number or machine serial number with php or javascript on localhost ??

we can get it with following mand in cmd

wmic DISKDRIVE GET SerialNumber

or machine serial number by this

wmic bios get serialnumber

is that possible with php or javascript ?? something in php

<?php

echo DISKDRIVE GET SerialNumber //** some thing like this on local host

?>

Need is to give a project to Clint on local host, and i want no one to access it on other puter (in php)

is there a way i can get hard disk serial number or machine serial number with php or javascript on localhost ??

we can get it with following mand in cmd

wmic DISKDRIVE GET SerialNumber

or machine serial number by this

wmic bios get serialnumber

is that possible with php or javascript ?? something in php

<?php

echo DISKDRIVE GET SerialNumber //** some thing like this on local host

?>

Need is to give a project to Clint on local host, and i want no one to access it on other puter (in php)

Share Improve this question edited Dec 10, 2012 at 8:12 Charles 51.4k13 gold badges106 silver badges144 bronze badges asked Dec 10, 2012 at 8:01 HarinderHarinder 1,2578 gold badges27 silver badges54 bronze badges 12
  • Not possible! Otherwise would be a big security flaw! – Ben Carey Commented Dec 10, 2012 at 8:03
  • 4 What does "on localhost" mean? On the server or on the client? – deceze Commented Dec 10, 2012 at 8:04
  • In IE you can use ActiveX.. the user will have to give permission for this to execute. Maybe there is a possibility? – Wouter de Kort Commented Dec 10, 2012 at 8:04
  • 1 You can of course use shell_exec('wmic DISKDRIVE GET SerialNumber 2>&1') or shell_exec('wmic bios get serialnumber 2>&1') if wmic is installed on server and your PHP has permission to run it. The '2>&1' part is used from the suggestion here. – Lenin Commented Dec 10, 2012 at 8:38
  • 1 @Lenin thx bro it worked ... can u make it and not ment so i can accept it and close this question – Harinder Commented Dec 10, 2012 at 8:42
 |  Show 7 more ments

2 Answers 2

Reset to default 7

You can of course use

shell_exec('wmic DISKDRIVE GET SerialNumber 2>&1')

or

shell_exec('wmic bios get serialnumber 2>&1') 

if wmic is installed on server and your PHP has permission to run it.

The '2>&1' part is used from the suggestion here.

impossblie. Nothing can break the browser sandbox, otherwize it will be a big security problem.

The only possibility is via ActiveX , but still need to signature and change the IE settings. (no cross platform, not cross browser)

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1743733686a4497873.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信