문제

I'm trying to represent the following Perl line in PHP:

$msg="!<connect_nettapi>\cD";  # Message ends with CTRL+D

I'm sending this string over a socket and the receiving API requires that the command be terminated by the CTRL+D character. I've been trying to use:

$msg="!<connect_nettapi>" . chr(some_hex_code);  # Message ends with CTRL+D

Thanks in advance.

올바른 솔루션이 없습니다

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top