NameSilo

Current user's machine name

Namecheap AuctionsNamecheap Auctions
SpaceshipSpaceship
Namecheap AuctionsNamecheap Auctions
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
Close
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
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
Close
Im finding this doesnt work on my web server but only on my localhost server so MasterB is correct.

PJ
 
0
Close
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
Close
How exactly does this script help?
Where can we use it?
 
0
Close
If it told a username.. it makes the person more easy to hack...
 
0
Close
AIVikingsAIVikings

We're social

Escrow.com
Spaceship
Domain Recover
CryptoExchange.com

NamePros updates

New: watch any domain
You can now watch domains on NamePros. We check each one and notify you when something changes. Search for a domain and press Watch on...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back