Created
September 2, 2022 16:55
-
-
Save yasudacloud/98343be1167747427033c2a63b318a6a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$timeout = 2000; | |
$socket = stream_socket_client( | |
"unix://\0testtest", | |
$errorCode, | |
$errorMessage, | |
$timeout, | |
); | |
if (!$socket) { | |
var_dump($errorCode); | |
var_dump($errorMessage); | |
} else { | |
fwrite($socket, "CLIENT MESSAGE\n"); | |
while (!feof($socket)) { | |
echo "@send"; | |
echo fgets($socket, 1024); | |
} | |
fclose($socket); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment