Drupal's version of Wordpress' wp_insert_post()? I just started playing with Drupal and I'd like the user to be able to add a custom node(or content) outside the admin by providing a form and then add that to Drupal's database once submitted. How do I do this programmatically and securely? Wordpress has a wp_insert_post() function for this functionality, what's the Drupal version?
Are you sure you want to do it programmatically?
You can just create the Content Type and use Permissions to control which user's roles can add/edit/delete that type of content.