Get Client Machine Name in PHP

后端 未结 6 573
借酒劲吻你
借酒劲吻你 2020-12-30 23:58

This program only returns the client machine name in localhost only

echo gethostbyaddr($_SERVER[\'REMOTE_ADDR\']);

If it is run from an online s

6条回答
  •  生来不讨喜
    2020-12-31 00:54

    gethostname() using the IP from $_SERVER['REMOTE_ADDR'] while accessing the script remotely will return the IP of your internet connection, not your computer.

提交回复
热议问题