I have updated the script above and packaged it with rawlinsons comment count script into a small toolbox which can be found here.
Features:
* Posts and comments migration from sphpblog text files to wordpress database
* Fixes for images, urls and html formatting.
* Conversion to unicode
* Creates “page moved” for old sphpblog permalinks to correct wordpress post
* Comment counts update.
Enjoy, and always backup your wordpress database.
Check the other thread, I have posted an updated script which hopefully works better.
Since the script didn’t work for me, I modified it to actually create the posts and comments. It also transforms the characters to utf-8 (UNICODE) before inserting them in the database. The modified script can be found here. The scrips now also fixes URLs and html braces “[“.
The comment count also needs to be fixed after running the script. This script takes care of that.