I just whipped up some PHP and threw it in the root of a brand new WordPress 2.9.2 install:
Voila. The post appeared when navigating to the .php file.
See: http://prex.wordpress.org/Function_Reference/wp_insert_post.
For more creativity, get into the database: http://prex.wordpress.org/Function_Reference/wpdb_Class