1.11M Members

identify the pc with php

 
0
 

hello,

i want to make a script in php that identify the pc. actually i want to make a script like antivirus software which can only install at one pc. if we want to install it on other pc it cant. and also if we install it on same pc after formating complete harddrive it will install, but on any other pc it will not install.

i want to make a script which check that the programme will install only on same pc every time after formatting. but if it is not same pc it will not work.

thanks.

 
-1
 

how about this ,getting the computer name
gethostname() try to echo and it will display your computer name

LastMitch
Deleted Member
 
0
 

@sainigks

i want to make a script in php that identify the pc.

The only way to identify a pc with php is using a cookie.

if we want to install it on other pc it cant. and also if we install it on same pc after formating complete harddrive it will install, but on any other pc it will not install.

PHP doesn't do that. This question is more suited in the Software Development section.

i want to make a script which check that the programme will install only on same pc every time after formatting. but if it is not same pc it will not work.

PHP doesn't do that either. This question is also more suited in the Software Development section too.

 
0
 

thakns dear
gethostname() work well but after formatting pc it will not work because pc name will be changed or may not. so it cant identify the pc properly.

 
0
 

Hello,

if you are not referring to remote identification then try php_uname(): http://php.net/manual/en/function.php-uname.php

echo php_uname();

there is also posix_uname() which returns the same information into an array format, but I'm not sure if it works on Windows without one of these: http://en.wikipedia.org/wiki/POSIX#POSIX_for_Windows

print_r(posix_uname());

but in any case, as LastMitch wrote, this will not give a specific values about the machine.

 
0
 

gethostname() try to echo and it will display your computer name

This will give you the name of the server, not the connected client.

From the manual: "gethostname() gets the standard host name for the local machine."

You
This article has been dead for over six months: Start a new discussion instead
Post:
Start New Discussion
Tags Related to this Article