niXforums Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   PreferencesPreferences   Log in to check your private messagesLog in to check your private messages   Log inLog in 
·  nixdoc.net ·  man pages ·  Linux HOWTOs ·  FreeBSD Tips ·  Forums
navigation Forum index » Programming » PHP
Capturing user login Information of windows
Post new topic   Reply to topic Page 1 of 1 [4 Posts] View previous topic :: View next topic
Author Message
sachin
*nix forums beginner


Joined: 13 Mar 2006
Posts: 11

PostPosted: Fri Jul 21, 2006 12:16 pm    Post subject: Re: Capturing user login Information of windows Reply with quote

Hi Csaba,
The solution given by you works only on the server side....[In the
sense, the system which runs apache server]. To be clear lets say s1 is
server comp and u1 as the user of this server. s2 as the client comp
and u2 as the user of this comp.
When i ran the code on the comp u2 it returned me the system name as s1
and the user name as u1.I want it to return the user name of the system
where this php page is opened.
Please help me..
Back to top
sachin
*nix forums beginner


Joined: 13 Mar 2006
Posts: 11

PostPosted: Fri Jul 21, 2006 11:54 am    Post subject: Re: Capturing user login Information of windows Reply with quote

Thanks a lot Smile
It Worked for me........
Back to top
Csaba Gabor
*nix forums beginner


Joined: 27 Mar 2006
Posts: 28

PostPosted: Fri Jul 21, 2006 11:43 am    Post subject: Re: Capturing user login Information of windows Reply with quote

sachu wrote:
Quote:
Hi Everyone,
I want develop the intranet site with seamless authentication. Is there
any way to capture only the user name who has logged in the windows
machine.
Iam using PHP 5.0 MySQL and IIS Server.
I have tried with $_SERVER['LOGON_USER'] but its returning nothing.
Please help me out.

This works for me under WinXP / Apache 2 (note that $nw->username is
not useful in this sense):

$nw = new COM("WScript.Network");
print "username0: " . $nw->username . "<br><br>";

$computername = $nw->computername;
print "computername: $computername<br>";
$owmi = new COM("winmgmts:\\\\$computername\\root\\cimv2");
$comp = $owmi->get("win32_computersystem.name='$computername'");
print "username: " . $comp->username;

Csaba Gabor from Vienna
Back to top
sachin
*nix forums beginner


Joined: 13 Mar 2006
Posts: 11

PostPosted: Fri Jul 21, 2006 5:44 am    Post subject: Capturing user login Information of windows Reply with quote

Hi Everyone,
I want develop the intranet site with seamless authentication. Is there
any way to capture only the user name who has logged in the windows
machine.
Iam using PHP 5.0 MySQL and IIS Server.
I have tried with $_SERVER['LOGON_USER'] but its returning nothing.
Please help me out.
Back to top
Google

Back to top
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [4 Posts] View previous topic :: View next topic
The time now is Thu Dec 04, 2008 7:04 am | All times are GMT
navigation Forum index » Programming » PHP
Jump to:  

Similar Topics
Topic Author Forum Replies Last Post
No new posts postfix smtp authentication using mysql stored user/pass rtresidd Postfix 0 Fri Oct 03, 2008 5:58 am
No new posts User Environment - export PATH variable paalepu AIX 0 Tue Sep 12, 2006 8:12 pm
No new posts problem with windows installer Christian Rengstl PostgreSQL 0 Fri Jul 21, 2006 10:55 am
No new posts Login problem Y.BulentAVCI Debian 1 Fri Jul 21, 2006 9:20 am
No new posts Problem with Win32-SerialPort over bluetooth @ windows + ... ctloh Perl 0 Fri Jul 21, 2006 8:08 am

Mortgage Calculator | Loans | Naruto | Credit Counseling | Electricity Suppliers
Copyright © 2004-2005 DeniX Solutions SRL
 
Other DeniX Solutions sites: Unix/Linux blog |  electronics forum |  medicine forum |  science forum | 
Privacy Policy


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1636s ][ Queries: 20 (0.0868s) ][ GZIP on - Debug on ]