stream_socket_sendto

Supported Versions: PHP 5, PHP 7, PHP 8
Sends a message to a socket, whether it is connected or not
<?php stream_socket_sendto(    resource $socket,    string $data,    int $flags = 0,    string $address = ""): int|false
<?php             fwrite($client, $request);

            $response = fread($client, 65536);



            stream_socket_sendto($socket, $response, 0, $peer);

            ++$received;

            fclose($client);

        });