stream_context_create(), fopen(), and stream_context_get_options() are functions commonly used to manipulate streams. Through these functions, developers can create, configure, and obtain context settings for file streams. Especially when requesting HTTP, using a combination of these functions gives you the flexibility to set HTTP request headers and get HTTP configuration options from the stream context.
stream_context_get_options