Simulate remote drupal user
I suggest you look into the Services Module. The entire concept is based upon 'programmatic remote users' logging into a Drupal site and accessing whatever portion of the 'out of the box' site API you enabled for your remote users to access. Additionally, Services offers a well designed means of creating your own API routines that your selectively expose to different remote users. 

The out of the box API calls enable you to create users, nodes, comments, and so on. Most of the basic operations a user can do are available. 

Check out: http://drupal.org/node/1070066