Page 1 of 1

Gästebuch / guestbook import

Posted: Tue 13. Mar 2007, 22:41
by 2xS
Hi,

I'm wondering if there is a possibility to import entries from another guestbook. I've exported the entries and now the following list

...
# ---------------------------- Eintrag 211 ---------------------------------

ENTRY 211 DATE 2006/08/14 14:51:14
IP=195.93.xxx.yyy
FIELD_NAME=<Hepziah>
FIELD_EMAIL=<>
FIELD_HOMEPAGE=<http://www.myspace.com>
FIELD_MESSAGE=<Die Seite sieht super aus. Herzlichen Gl&uuml;ckwunsch zum Relaunch!>
END_ENTRIES

# ---------------------------- Eintrag 212 ---------------------------------

ENTRY 212 DATE 2006/09/15 16:07:32
IP=84.151.xxx.yyy
FIELD_NAME=<Mike>
FIELD_EMAIL=<xyz@gmx.de>
FIELD_HOMEPAGE=<http://xyz.de>
FIELD_MESSAGE=<Prima Seite. Weiter so!>
END_ENTRIES

...more entries following.

The guestbook table in phpwcms encodes the useragent via md5, right? And the created timestamp is stored as unixtimestamp.
What is the best way to extract data from my old entries and store this into the phpwcms guestbook table???
I don't need a frontend, a sql statement or php code snippet would be enough. Is there anybody out there who could help?

Thanks for your help.
2xS

Posted: Sat 17. Mar 2007, 13:26
by elconde
what is the basis for your old guestbook? txt. files oder sql or...? with sql it should be possible to export and import it with the help of phpmyadmin or similar tools.

Posted: Sat 17. Mar 2007, 13:33
by 2xS
I have all the entries listed in a textfile. They are listed one below the other as described in the post above. Entries are divided by
# ---------------------------- Eintrag ### ---------------------------------

Does anyone know a good way to convert it?

Posted: Sat 17. Mar 2007, 15:39
by elconde
if you are used to php and mysql thats not a problem.

you can write your own script as it is shown here:
http://forum.de.selfhtml.org/archiv/2005/7/t111705/

or you can use software:
http://www.spectralcore.com/fullconvert ... server.php

some google search for "text to sql" should help you too!