What about:
$nodeArray = array(
‘type’ => ‘nodetype’,
‘status’ => ‘1’,
‘promote’ => ‘0’,
‘uid’ => $user->uid,
);
node_validate($nodeArray);
$node = node_submit($nodeArray);
node_save($node);
You could run your data through a function like that; should
work for what you’re trying to do (if I’m reading your question
right).
From: support-bounces@drupal.org
[mailto:support-bounces@drupal.org] On Behalf Of Mutuku Ndeti
Sent: Tuesday, July 13, 2010 3:44 PM
To: support
Subject: [support] Automatically creating nodes.
Hello,
I have an application that I want to link to a drupal site. I want to have
nodes autocreated using data from the application. Is there an API for
autocreating nodes in drupal?
Mutuku