Gen. partnerAlgotech

PHP function stream_socket_recvfrom()

Receives data from a socket, connected or not

|
September 11, 2019

Availability in PHP 5.0

Receives data from a socket, connected or not

Parameters

Parameter Data type Default value Note
$socket resource not The remote socket.
$length int not The number of bytes to receive from the socket.
$flags int null, The value of flags can be any combination of the following: Possible values for flags
STREAM_OOB Process OOB (out-of-band) data.
STREAM_PEEK Retrieve data from the socket, but do not consume the buffer. Subsequent calls to fread or stream_socket_recvfrom will see the same data.
$address string null If address is provided it will be populated with the address of the remote socket.

Return values

string

the read data, as a string

Other resources

Official documentation for stream-socket-recvfrom

Loading comments...

Stay in the loop

Subscribe to our newsletter and get the latest cybersecurity news delivered straight to your inbox.

Your data is safe. You can unsubscribe from the newsletter at any time.