PHP/fx/stream notification callback

from HTYP, the free directory anyone can edit if they can prove to me that they're not a spambot
< PHP
Jump to navigation Jump to search
PHP function: stream_notification_callback()

About

This is the prototype for a callback function. A user-function using this same format will be called when any of several different events occur on a stream.

The user's function can be activated as a stream's callback by first creating a context that uses it:

$ctx = stream_context_create();
stream_context_set_params($ctx, array("notification" => "stream_notification_callback"));

...and then opening the stream using that context.

However: this page mentions casually in passing that it is "Only supported for http:// and ftp:// stream wrappers.", wtf.

Links

Official