Так тоже самое:
<?php
include_once('doc.write.php');
error_reporting(E_ALL);
$fp = fsockopen("ssl://localhost", 6000);
$send = doc_write_create();
doc_write_ui8($send, 6);
doc_write_string($send, "hello");
fputs($fp, doc_write_content($send));
$html = fread($fp, 1000000);
fclose($fp);
echo "<pre>".$html."</pre>";
?>
На сервере:
INFORMATION: tcp-server is listen on address 0x9afe312 and port 6000
INFORMATION: incoming of new connection 8
INFORMATION: client was connected
connection encrypted
data transfer from client
вот тут должно вывестись hello.