PHP socket出现乱码
PHP这边作为客户端发起连接请求,代码如下:
<!--Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->$socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP); $connection = socket_connect($socket, '192.168.8.216', 2012); $buffer = @socket_read($socket, 1024, PHP_NORMAL_READ); var_dump($buffer);