This is the simplest answer I could find for a client needing to POST an XML SOAP message to a server in another domain.
Not sure on the security because the POST isn’t validated so it just passes on whatever the client sends.
libcurl has a lot of options
echo "$h = $v
# tell the client to expect an xml reply
# then send the the xml reply from the webservice
# close the session to free up resources
/* This dumps all the session variables from PHP woo hoo! var_dump(get_defined_vars()); */