The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Running script from other user rather than login user rawatds Shell Programming and Scripting 3 01-30-2009 01:18 PM
check user id before running script cpolikowsky UNIX for Dummies Questions & Answers 3 06-06-2008 01:02 PM
AIX:creating user with username more than 8 chars anuafs84 UNIX for Dummies Questions & Answers 0 04-14-2007 05:00 AM
find the server name a script is running on shellburger UNIX for Dummies Questions & Answers 3 08-31-2006 12:15 AM
running a script under different user Gary Dunn Shell Programming and Scripting 4 12-13-2004 06:17 PM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 06-09-2008
garric garric is offline
Registered User
  
 

Join Date: Apr 2006
Posts: 99
Find username of user running the script

Hello All,

If I have a simple cgi script and want to find the name of the person accessing the page, is it possible? How do I get the name of this user? Please help.


I was trying a vague method but it doesn't seem to work with all browsers and versions ...

Code:
$val=$ENV{'HTTP_COOKIE'};
$name = (split ('=',(split(';',$val))[1]))[1];
print "$name";

Regards,
garric

Last edited by Yogesh Sawant; 06-09-2008 at 08:01 AM.. Reason: added code tags
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 10:58 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0