Well I've a .txt file right here, with alot of text.
I would like to take certain lines containing what I want and transfer them to a MySQL server. I do think this might be a quite hard one but alright.
Here some lines from my .txt file:
Loading Ambient.scr
player::Sentient::DeactivateWeapon : Tried to deactivate a non-active weapon in hand 0
local.weap = $("w" + local.n).model (global/weapontrade.scr, 8)
local.weap = $("w" + local.n)^
^~^~^ Script Error: Field 'model' applied to NULL listener
clientCommand: †|RCR|† sƒ¢.Sef^ *{Wa}* : 195 : _lias screenshot say I have been caught with a hacked SS
clientCommand: Skullcandy : 178 : score
Cvar_Set2: bertox 0
clientCommand: †|RCR|† sƒ¢.Sef^ *{Wa}* : 196 : dmmessage 0 lose at bash
And the line I would like to get out is this one:
clientCommand: †|RCR|† sƒ¢.Sef^ *{Wa}* : 196 : dmmessage 0 lose at bash
Alright, now when I have said that. I would like some help making a script which finds these kinda lines, aka chat.
Than transfer them into variables:
clientCommand: †|RCR|† sƒ¢.Sef^ *{Wa}* : 196 : dmmessage 0 lose at bash
=
†|RCR|† sƒ¢.Sef^ *{Wa}* : lose at bash
So it removes the unneeded commands as: clientcommand, dmmessage, numbers.
Than i would like the name and the message to be each a variable which i could upload too a mysql like this.
$send = "INSERT into logs (type, name)
VALUES('$name', '$message')"
I've seen this been done, do anyone here know how to do it? Remember the file with logg wil also be uploaded once a day, so I would like the script to know where it stopped and where too start.
If further explanation is needed please post.
Thanks!