Dynadot — .com Transfer

Current user's machine name

SpaceshipSpaceship
Watch
While looking in the PHP predefined variables i found an intersting one: $_ENV["COMPUTERNAME"]. what this does is it gives the current username of the person viewing your site. This is quite good if you are making a poll for a intranet where each user has their own username.

Have a look at this and tell me what you think.

PHP:
<?php
$username = $_ENV["COMPUTERNAME"]; //set variable

echo $username; //show the value of the variable

?>
I hope somebody finds it helpful.

ASGSOFT
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
Unstoppable Domains — AI StorefrontUnstoppable Domains — AI Storefront
Actually, this displays the computer name of the computer which the server is on. Your computer name doesn't get transmitted through the headers (as far as I know).
 
0
•••
Im finding this doesnt work on my web server but only on my localhost server so MasterB is correct.

PJ
 
0
•••
Try this:

echo gethostbyaddr($_SERVER['REMOTE_ADDR'])."<br/>\n";

It'll give what is essentially your point of access to the internet through your ISP, but not your actual machine name. I do not believe your true host name is ever routed (unless perhaps you have a direct connection to the internet like some edu workstations...)
 
0
•••
How exactly does this script help?
Where can we use it?
 
0
•••
If it told a username.. it makes the person more easy to hack...
 
0
•••
Appraise.net

We're social

Escrow.com
Spaceship
Rexus Domain
CryptoExchange.com
Domain Recover
CatchDoms
DomainEasy — Live Options
DomDB
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back