Thanks! The problems 2 & 3 are solved, but problem 1 exists....
This is the code, related to my problem (I thin):
Code: Select all
$title = utf8_normalize_nfc($title[1][$i]);
$bbcode_uid = $bbcode_bitfield = $flags = '';
$message = utf8_normalize_nfc($message);
generate_text_for_storage($title, $bbcode_uid, $bbcode_bitfield, $flags);
generate_text_for_storage($message, $bbcode_uid, $bbcode_bitfield, $flags, true, true, true);
// If the news is already in our database....
$sql = "SELECT post_subject FROM " . POSTS_TABLE . " WHERE `post_subject` = '" . $title . "'";
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
if ( !$result || $row !== null && in_array($title, $row) || empty($result) || empty($row) ) {
continue; // there is no reason the continue THIS iteration.
}
// Prepare some data
$this_i_post_data = array_merge($post_data, array(
"topic_title" => $title,
"message_md5" => md5($message),
"bbcode_uid" => '',
'message' => $message,
));
// Submit the post
submit_post("post", $this_i_post_data['topic_title'], $bot_data['username'], POST_NORMAL, $poll, $this_i_post_data);
Sorry for my bad english, I am Dutch.....