HELP!

A

Anonymous

Guest
OK, this is a bit of an interesting job for anyone who can help out...

I have a txt file which reads like this:

!GENERAL
VERSION = 1
RELOAD = 1
UPDATE = 20030417111736
CONNECTED CLIENTS = 2
CONNECTED SERVERS = 1
!CLIENTS
TEST:200000:test:ATC:199.999::::::::::LAN:9:11:0:0:100::::::::::::::::::20030417111655
GB_DIR:200000:ANDREW BERRY EGNX:pILOT::29.880860:-103.699770:3816:0:T/B747/F:120:EGLL:FL320:EGNX:LAN:1:1:1200:0:40:1:I:1000:1100:1:30:4:30:EGBB:TESTING!:EGLL - HON - TNT - EGNX:::::::20030417111431
!SERVERS
LAN:127.0.0.1:local:Local Windows FSD server:1


I need to read the following information out of each line and calculate a time:
The person's ID Number (200000 - the second number) and also the LAST number, "20030417111431" - which is the date in the form of YearMonthDayHourMinuteSecond - the time they connected. I need to then store this information EITHER:
until the connection is closed, OR keep writing it to the database... the only thing being physically logged for the future is the time, however the ID will be what I use to input into the correct record in the database.

Any help would be very very gratefully recieved!!

Regards,
Andrew
 
to add, I believe this data updates every 1 minute, so perhaps I could just keep adding 1 minute to the database every time it see's the person's username appear?

Andrew
 
the data between the :::: crap will change a lot, for example 2 values of a "PILOT" connection will change every time the client moves around the world (lattitude/longtitude)

Andrew
 
oh, but it will still be the same layout. The number of :'s will not change
 
and to add to my original post, I need to read the word "ATC" or "PILOT" so as I can log it into the database table under the right column.

Andrew
 
Back
Top