This is my custom code for creating a node from some arbitrary data - this is executed in the browser from a different website by executing localhost/submit.php - the contents are below:
<?php define('DRUPAL_ROOT', "C:\wamp\www\mydrupalsite"); require_once DRUPAL_ROOT . '/includes/bootstrap.inc'; drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL); $bodytext = "Foo bar"; $node = new stdClass(); $node->type = "article"; node_object_prepare($node); $node->title = "A new node sees the light of day"; $node->language = LANGUAGE_NONE; $node->uid = 1; node_save($node); ?>
This results in 2 nodes being created even though I've just hit the script once in the browser. Can anyone see what's wrong with this?
The output gives me 2 nodes (both have different nids) and they have identical data.