I have migrate my old phpnuke website to wordpress using this script
You can check the result on http://www.eyesonsky.com/
<br />
/*------------------------------------------<br />
2009 Joel Brueziere<br />
Migrate posts from phpnuke to Wordpress<br />
------------------------------------------*/</p>
<p><?php</p>
<p> $sql="";</p>
<p> $dbhost = "yourhost";<br />
$user = "youruser";<br />
$password = "thepass";</p>
<p> $conn = mysql_connect($dbhost,$user,$password);<br />
//echo "[conn=$conn]<br />";</p>
<p> $sql="select sid, catid, aid, title, time, hometext, bodytext, comments, counter, topic, informant, notes, ihome from stories";</p>
<p> if($conn){<br />
$result = mysql_query($sql);<br />
echo "[result=$result]<br />";<br />
$nb = mysql_num_rows($result);<br />
echo "[nb=$nb]<br />";</p>
<p> while(list($sid, $catid, $aid, $title, $time, $hometext, $bodytext, $comments, $counter, $topic, $informant, $notes, $ihome) = mysql_fetch_row($result)) {<br />
echo "----------------------------------------------------------------------<br />";</p>
<p> $title = addslashes($title);<br />
echo "<br />title=$title<br />";<br />
$hometext = addslashes($hometext);<br />
echo "<br />hometext=$hometext<br />";<br />
$bodytext = addslashes($bodytext);</p>
<p> $sqlinsert="INSERT INTO wp.wpfr_posts (
ID ,post_author ,post_date ,post_date_gmt ,post_content ,post_title ,post_excerpt ,post_status ,comment_status ,ping_status ,
post_password ,post_name ,to_ping ,pinged ,post_modified ,post_modified_gmt ,post_content_filtered ,post_parent ,guid ,menu_order ,
post_type ,post_mime_type ,comment_count
)
VALUES (
$sid , 1, '$time', '$time', '$hometext <!--more--> $bodytext', '$title', '', 'publish', 'open', 'open', '', '', '', '', '$time', '$time', '', '0', '', '0', 'post', '', '0'
);
";
$insert = mysql_query($sqlinsert);
echo "
insert=[$insert]
";
}
if($result){
}else{
echo "
sql=$sql
";
echo "error mysql_query
";
}
}
else{
echo "
conn=$conn
";
echo "
sql=$sql
";
echo "error connect db";
}
?>