When dealing with timeout values in sockets, the connection timeout can be changed independently of the read/write time out. Which function must be used for this purpose?
stream_set_timeout
Correct:
stream_set_timeout
To adjust the timeout of a socket when reading or writing data, you must use the
stream_set_timeout function. It is not possible to adjust the timeout of read operations
independently of writes—however, note that a stream timeout does not affect the connection
timeout set when calling fsockopen().