Jump to content

retrive clients computer name


l0ve2hat3

Recommended Posts

more than likely they have a cookie saved on the computer that includes info like ip address or maybe you entered in somewhere on their site that it's your "home" computer, so when you login from somewhere else, even though your name/pw is correct, the cookie isn't there so it knows you aren't at the same computer. 

Guest Xanza

This is not possible to accomplish using a normal web page. It would be a major breach of privacy if this were possible -- not to mention that it is illegal to collect personal information (that which uniquely identifies an individual computer) without the visitor's knowledge. Several companies have gotten into trouble for this. Of course, I realize you state special circumstances. However, that does not change the facts. You'll just have to settle for asking the visitor to provide this information voluntarily.

the users that will register will have to agree to the TOS....  so your saying there is no possible way to idendify a  computer on the web?  so i can go online and do something illegal and the fbi will not know it came from one specific computer??? i find this hard to believe.  it has to be possible.

Guest Xanza

Sure it's possible, you can do it with ASP.NET... As for PHP, I'm not too sure... I'm not horribly keept-up with windows commands, but if you were able to view the computer name via the command prompt by doing: ipconfig/all hostname or something, then you would be able to do something like this:

 

<?php
$computer_name = `ipconfig/all hostname`;

return $computer_name;
?>

 

But even if you were able to do this, it would cause a conflict for your Linux and Mac Users.

If the user's computer has a static IP address and if that IP address is mapped to a computer name via DNS, then you can get it (sometimes), if not the best you might be able to do is get the IP address.

 

The following code snippet will get either the name or the IP address:

<?php
    if ($_SERVER["HTTP_X_FORWARDED_FOR"] != ""){
        $IP = $_SERVER["HTTP_X_FORWARDED_FOR"];
        $proxy = $_SERVER["REMOTE_ADDR"];
        $host = @gethostbyaddr($_SERVER["HTTP_X_FORWARDED_FOR"]);
    }else{
        $IP = $_SERVER["REMOTE_ADDR"];
        $host = @gethostbyaddr($_SERVER["REMOTE_ADDR"]);
    }
?>

 

Ken

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.