Php code to get local computer ip address

if your server of your system is in your workgroup,you can use this the function “$_SERVER[“REMOTE_ADDR”];” to get your local ip, but if your server is in remote,you can only use any other ways.

in this time ,you can use javascript,not the php code,because php run in server,javascript run in IE,you can use fllow two activex
  <OBJECT id=locator classid=CLSID:76A64158-CB41-11D1-8B02-00600806D9B6 VIEWASTEXT></OBJECT>
  <OBJECT id=foo classid=CLSID:75718C9A-F029-11d1-A1AC-00C04FB6C223></OBJECT>
I had typed the code to solve your issue, please check.
this code can get mac-address,ip-address and sdnsname