Well - that script gives me a 501 internal server error. Here's what I'm trying to do:
Server A
User logs in using <form>
PHP script validates login info
uses fsock to set session var on Server B and returns session ID
redirects to server b with session ID in post var.
Right now I have to either do it as GET value or make a form with a hidden field for the session ID, but that adds an extra step where they have to submit.