-1
我通过套接字 开发PHP中的视频聊天应用程序,我使用的是Linux服务器 客户端都连接通过Telnet 就像TELNET 127.0.0.1 4444发送图像
而且代码发送文本给其他客户的消息如下
$msg['pid'] = posix_getpid();
$message = serialize($msg);
$f = fopen(self::PIPENAME, 'w+');
if(!$f) {
echo "ERROR: Can't open PIPE for writting\n";
return;
}
fwrite($f, $this->strlenInBytes($message) . $message);
fclose($f)
请告诉我如何发送图像?
感谢您的回复,但是如果通过socket_write($ sock,$ string,strlen($ string))发送图像; 然后我想我不需要转换它.. 我有点迷惑,请让我知道如果我是正确的.. – 2013-05-08 14:13:02