You can't use the header function to send data. The header function changes the header that the client gets from the request. But if you had two servers that you both had control over, you might be able to fake communication by using get_headers to send a request, and header to send a reply. This is just a thought of mine.
http://website_client.com/client.php
// Make A Request With get_headers to http://website_server.com
$response = get_headers('http://website_server.com/server.php', 1);
// Show Result
echo $response['Result'];
http://website_server.com/server.php
// Fake A Response With header Back To The Client
header('Result: Hello World');
// The message that will be seen if viewed by a web browser.
echo 'This Page Is Not To Be Accessed Directly. Bye.';
I'm not entirely sure if that would work, but it looks like it should...
And of course, none of this has anything to do with SOAP...
Edit: Okay. I just tried it out for fun. It works perfectly. So you could use that for a cheap way to get around the lack of the socket function. If your hosting actually allows you to use "get_headers". Here it is if you want to see:
Client Page |
Server Page. And I apologize in advance if I've gone off on a wild tangent that's completely irrelevant to your requirements...