I'm working on a drupal 6 module and need a way to save a static html version of a node to the server, using the user's permissions. Basically I need the equivalent of "wget -O out.htm http://mydrupalsite.org/node/1635" in drupal, that uses the activating user's permissions and login, but don't know enough about drupal to make this work without some pointers in the right direction. I've looked through the functions list and the module code for http://drupal.org/project/print, but no luck. Any help?
Thanks in advance.
EDIT: Clarification: What I'm trying to accomplish is have a sidebar link for users to use that saves a copy of the current page -exactly as apache just sent it the user- to the server. I'm trying to do this through drupal -without- using wget or any other system utility.