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.

Recommended Answers

All 5 Replies

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

Member Avatar for LastMitch

@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.

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.

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.

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."

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.