As Imran and Jamie said, you cannot do this completely on the client.
It is trivial to make the computer look like a public IP address - but only if you send a request to your server, either using XmlHTTPRequest , or adding a script tag to the head section or similar. The server can respond to this request by repeating the IP address at which the request apparently came. How you get this information depends on your server technology.
This will give you an IP address (using a server request), but I don't know how to get the computer name.
source share