[advanced search]
25 members in the live chat room. Join Chat!
Register Rules & FAQ NP$ Store Active Threads Mark Forums Read
Go Back   NamePros.Com > Design and Development > Webmaster Tutorials
User Name
Password

Old 03-04-2006, 01:33 PM   · #1
asgsoft
NamePros Regular
 
asgsoft's Avatar
 
Location: At Home
Trader Rating: (36)
Join Date: Sep 2005
Posts: 805
NP$: 1406.10 (Donate)
asgsoft is just really niceasgsoft is just really niceasgsoft is just really niceasgsoft is just really niceasgsoft is just really nice
Current user's machine name

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 Code:
<?php
$username
= $_ENV["COMPUTERNAME"]; //set variable

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

?>

I hope somebody finds it helpful.

ASGSOFT


Please register or log-in into NamePros to hide ads
asgsoft is offline   Reply With Quote
Old 03-11-2006, 11:52 AM   · #2
MasterB
Awesome™
 
MasterB's Avatar
 
Name: Brendan
Location: Boston
Trader Rating: (2)
Join Date: May 2005
Posts: 77
NP$: 1.00 (Donate)
MasterB is on a distinguished road
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).
MasterB is offline   Reply With Quote
Old 03-11-2006, 01:35 PM   · #3
.PJ
NamePros Regular
 
.PJ's Avatar
 
Trader Rating: (5)
Join Date: Aug 2004
Posts: 369
NP$: 191.50 (Donate)
.PJ is on a distinguished road
Im finding this doesnt work on my web server but only on my localhost server so MasterB is correct.

PJ
__________________
L33TSig.net
.PJ is offline   Reply With Quote
Old 03-18-2006, 01:29 PM   · #4
2knew
NamePros Member
 
Trader Rating: (16)
Join Date: Oct 2005
Posts: 184
NP$: 3091.00 (Donate)
2knew has a spectacular aura about2knew has a spectacular aura about
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...)
2knew is offline   Reply With Quote
Old 03-23-2006, 09:19 PM   · #5
bbalegere
Senior Member
 
bbalegere's Avatar
 
Name: Bharat Balegere
Location: Bangalore
Trader Rating: (15)
Join Date: Jul 2005
Posts: 1,146
NP$: 15.60 (Donate)
bbalegere is just really nicebbalegere is just really nicebbalegere is just really nicebbalegere is just really nice
How exactly does this script help?
Where can we use it?
bbalegere is offline   Reply With Quote
Old 04-01-2006, 02:19 PM   · #6
-Ray-
An American Soldier
 
-Ray-'s Avatar
 
Name: Ray
Location: Pennsylvania
Trader Rating: (16)
Join Date: Jun 2005
Posts: 1,388
NP$: 38.00 (Donate)
-Ray- is a name known to all-Ray- is a name known to all-Ray- is a name known to all-Ray- is a name known to all-Ray- is a name known to all-Ray- is a name known to all
If it told a username.. it makes the person more easy to hack...
__________________
<--An American Soldier-->
TheyMix.com
-Ray- is online now   Reply With Quote
Closed Thread

NamePros is a revenue sharing forum.

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Free link from my site-Trying to get users No recip required Archangel For Sale / Advertising Board 2 09-05-2005 02:18 PM
GameScript Summer Sale – 25% off plus promotions for current customers- 2 weeks only! John D Scripts For Sale 11 08-04-2005 10:56 AM
Auctions Starting at 99˘ No Reserve Domainut Domains For Sale - Auctions 5 11-13-2003 01:00 PM
ATTENTION:Hotmail and MSN Messanger Users!!!! bobbi The Break Room 0 03-12-2003 11:12 PM

Site Sponsors
http://www.mobisitetrader.com/ Hunting Moon Proof is in the Parking
Advertise your business at NamePros
All times are GMT -7. The time now is 09:47 AM.


Powered by: vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0