Adding Content to Drupal 7 through a remote PHP script In our system, the content is generated by a standalone PHP script that runs from command line. Is there a way to add this content programmatically to a remote Drupal 7 CMS from this standalone PHP script? 

I am not able to find such information on drupal.org. I have found the following code:

$node = new stdClass(); 

// Set content type
$node-&gt;type = 'article';

// Prepare defaults
node_object_prepare($node);

// Define language (currently language neutral)
$node-&gt;language = LANGUAGE_NONE;

// Basic content
$node-&gt;title = 'Test';
$node-&gt;body[$node-&gt;language][0]['value'] = 'Body text';

// Example if using custom fields
$node-&gt;field_CUSTOM_FIELD[$node-&gt;language][0]['value'] = 'Value';
// Example if using fields that are taxonomy type
$node-&gt;field_CUSTOM_FIELD_TAXONOMY[$node-&gt;language][0]['tid'] = 1;

// Save node
node_save($node);


But this code has to run from Drupal 7 server process only. This code cannot be used in a standalone PHP script that runs remotely. Another option is Entity API but that code too has to run on Drupal Server only. Do I need to create my own module and code my standalone PHP script to connect to API exposed by this module?
Services module can be used to allow to create node remotely

Check out some reference links as below


https://groups.drupal.org/node/144394
How do I POST a new node using the Services module?
https://drupal.org/node/1354202