Thanks to this well documented script. I found the answer from
http://question2answer.org/external.php
<?php
require_once 'qa-include/qa-base.php';
require_once QA_INCLUDE_DIR . 'qa-app-users.php';
require_once QA_INCLUDE_DIR . 'qa-app-posts.php';
$type = 'Q_QUEUED'; // question
$parentid = null; // does not follow another answer
$title = 'Why do birds sing?';
$content = '<html>2222222 <b>And</b> why do ....<br/>next line</html>?';
$format = 'html'; // plain text
$categoryid = null; // assume no category
$tags = array (
'birds',
'sing',
'love'
);
$userid = null; // qa_get_logged_in_userid()+1;
$notify = null;
$email = "anything@anything.www";
$name = 'John';
// function qa_post_create($type, $parentid, $title, $content, $format='', $categoryid=null, $tags=null, $userid=null, $notify=null, $email=null, $extravalue=null, $name=null)
$questionId = qa_post_create ( $type, $parentid, $title, $content, $format, $categoryid, $tags, $userid, null, null, null, $name );