1,105,456 Community Members

identify the pc with php

Member Avatar
sainigks
Light Poster
38 posts since Aug 2010
Reputation Points: 0 [?]
Q&As Helped to Solve: 2 [?]
Skill Endorsements: 0 [?]
 
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.

Member Avatar
code739
Posting Whiz in Training
213 posts since May 2012
Reputation Points: 17 [?]
Q&As Helped to Solve: 30 [?]
Skill Endorsements: 6 [?]
 
-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.

Member Avatar
sainigks
Light Poster
38 posts since Aug 2010
Reputation Points: 0 [?]
Q&As Helped to Solve: 2 [?]
Skill Endorsements: 0 [?]
 
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.

Member Avatar
cereal
Posting Virtuoso
1,710 posts since Aug 2007
Reputation Points: 461 [?]
Q&As Helped to Solve: 345 [?]
Skill Endorsements: 44 [?]
 
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.

Member Avatar
pritaeas
mod_pritaeas
11,298 posts since Jul 2006
Reputation Points: 1,420 [?]
Q&As Helped to Solve: 1,833 [?]
Skill Endorsements: 155 [?]
Moderator
Featured
Sponsor
 
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 three months: Start a new discussion instead
Post:
Start New Discussion
Tags Related to this Article