PHP provides a number of miscellaneous I/O streams that allow access to PHP's own input and output streams, the standard input, output and error file descriptors, in-memory and disk-backed temporary file streams, and filters that can manipulate other file resources as they are read from and written to.
Solution at the end of the question I am writing a PHP application that sends a message to a server …
php sockets stream php-socket php-stream-wrappersI know that I can create a PHP stream from a filename (a real one, or an URL), by using …
php stream fopen psr-7 php-stream-wrappers