Page 1 of 1 1
Topic Options
#44608 - 2003-08-30 12:00 AM Saving a file, with current users username
anthonyalderson Offline
Getting the hang of it

Registered: 2003-03-20
Posts: 52
Loc: England
Hi everyone, not a good subject title but anyway,

I have a kix script that saves details of who has
used a machine at anytime of the day, basically it logs username, time logged on, ip address and some other details, these are all saved into one
file called aut.txt, now i want it so that when the log is created, it logs it as username.txt instead of the generic aut.txt, say if i was logged on as aalderson, my log would be saved as aalderson.txt, and so on, i think you can see the picture now, so if anyone can help me achieve this i'd be very grateful.

Thanks in advance everyone,

Anth (hasnt been in a while)

Top
#44609 - 2003-08-30 12:07 AM Re: Saving a file, with current users username
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
if you now have:
$rc=open(1,"aut.txt",5)

change it to:
$rc=open(1,"@userid.txt",5)

and you are done [Wink]
_________________________
!

download KiXnet

Top
#44610 - 2003-08-29 01:11 PM Re: Saving a file, with current users username
anthonyalderson Offline
Getting the hang of it

Registered: 2003-03-20
Posts: 52
Loc: England
thanks lonkero, it worked perfectly, i personally thought i might have had to use the @fullname command myself but your idea works perfect, much appreciated lonkero,

Anth (forever in debt to the bb, its always there to save me)

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 837 anonymous users online.
Newest Members
ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder, M_Moore
17887 Registered Users

Generated in 0.05 seconds in which 0.024 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org