Creating content programmatically is easy in Drupal using node_save()
.
$node = new stdClass();
node_object_prepare($node);
$node->title = $_GET['title'];
$node->body = $_GET['text'];
node_save($node)
You can keep this code in a separated .php
file by calling drupal_bootstrap()
before creating the node.
chdir('/path/to/drupal');
require_once('includes/bootstrap.inc');
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
Another cleaner solution is to put everything in a small custom module and use hook_menu() to expose you handling code. See http://drupal.org/node/231276 for more information on module creation.
But beware that this let anyone who figured your URL schema create nodes on your website. You will probably need to protect access to your script. A secure solution may be to use the Services module to create node from your SMS gateway.