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. 

Link to comment
Share on other sites

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.