-3

for the security purpose how I get visitor computer name and related details using php?

I try $_ENV['COMPUTERNAME'] it showing my server name not client computer details...

There is any option to get client computer name?

Cœur
  • 37,241
  • 25
  • 195
  • 267
user475464
  • 1,741
  • 10
  • 26
  • 38

2 Answers2

2

In normal cases, you can't. The only things you can retrieve are:

  • the data sent with the request from the browser and/or
  • the server info.

Sending the computer name as part of the request simply doesn't make sense for the browser. Also, I'm skeptical it is even possible (in a reliable way) to get it via other ways.

Amal Murali
  • 75,622
  • 18
  • 128
  • 150
Shoe
  • 74,840
  • 36
  • 166
  • 272
-1
echo 'Current computer  owner: ' . get_current_user().'</br>';

I have only found this code that returns the name you have given to the computer Soory i think is error return the carrent owner of http protocol to have the php online page and works on the online server at local server youcan have your machine name with

echo 'Computer Name: ' . getenv('COMPUTERNAME').'</br>';
alexandros
  • 22
  • 5
  • This does not answer the question. If you are going to add an answer a 10 year old question, it should be a correct and complete one. Nevemind the issues with the question itself! – Jared Smith Apr 12 '23 at 15:19
  • sorry, I'm looking for the same topic after 10 years, it would help if I had an answer, but I only found codes that found the name of the client only on the local server, the name of the online server and an ip address that can change from each machine, I probably don't have one answer if we can find out the name of the one you are visiting us with. – alexandros Apr 12 '23 at 15:52