What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » WLM Plus! General » MSG Plus Log Files > MySQL DB?

MSG Plus Log Files > MySQL DB?
Author: Message:
-dt-
Scripting Contest Winner
*****

Avatar
;o

Posts: 1819
Reputation: 74
35 / Male / Flag
Joined: Mar 2004
RE: MSG Plus Log Files > MySQL DB?
quote:
Originally posted by ipab
sounds good. Problem is I feel that we are getting ahead of ourselves here [Image: msn_sad.gif]. I cant seem to figure out a mass port for the logs into the db.
hmm..
* -dt- opens Vim and tries to parse them with preg_match....


edit: done it :D


code:
$x = file_get_contents('./chatlog.txt');


//this regexp matches the body of the text (the part where you talk :P)
$match = "/\.-{68}\.(?:.+)\.-{68}(.+)-{68}\./smUx";


//this regexp matches the header (part with dates n stuff)
$head = "/\.-{68}\.(.+)\.-{68}/smUx";

preg_match_all($match,$x,$data);
preg_match_all($head,$x,$header);

//show the first header
echo $header[1][0];

//show the first body
echo $data[1][0];




btw those regexp's are no where near pefect

This post was edited on 12-07-2005 at 09:38 AM by -dt-.
[Image: dt2.0v2.png]      Happy Birthday, WDZ
12-07-2005 08:43 AM
Profile PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
MSG Plus Log Files > MySQL DB? - by r5a on 12-06-2005 at 02:52 AM
RE: MSG Plus Log Files > MySQL DB? - by ipab on 12-06-2005 at 06:04 AM
RE: MSG Plus Log Files > MySQL DB? - by r5a on 12-06-2005 at 06:06 AM
RE: MSG Plus Log Files > MySQL DB? - by ipab on 12-06-2005 at 06:08 AM
RE: MSG Plus Log Files > MySQL DB? - by r5a on 12-06-2005 at 06:09 AM
RE: MSG Plus Log Files > MySQL DB? - by -dt- on 12-06-2005 at 07:34 AM
RE: MSG Plus Log Files > MySQL DB? - by ipab on 12-06-2005 at 07:47 AM
RE: MSG Plus Log Files > MySQL DB? - by Purity on 12-06-2005 at 01:49 PM
RE: MSG Plus Log Files > MySQL DB? - by Matti on 12-06-2005 at 05:26 PM
RE: MSG Plus Log Files > MySQL DB? - by ipab on 12-06-2005 at 05:33 PM
RE: MSG Plus Log Files > MySQL DB? - by r5a on 12-06-2005 at 09:00 PM
RE: MSG Plus Log Files > MySQL DB? - by -dt- on 12-06-2005 at 10:14 PM
RE: MSG Plus Log Files > MySQL DB? - by ipab on 12-07-2005 at 02:10 AM
RE: MSG Plus Log Files > MySQL DB? - by -dt- on 12-07-2005 at 05:53 AM
RE: MSG Plus Log Files > MySQL DB? - by ipab on 12-07-2005 at 07:22 AM
RE: MSG Plus Log Files > MySQL DB? - by -dt- on 12-07-2005 at 08:43 AM
RE: MSG Plus Log Files > MySQL DB? - by thyone on 12-13-2005 at 05:04 PM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On