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
{{#set:language=PHP}}{{#set:page type=library function}}{{#set:function name=stream_notification_callback}}
|
PHP function:
stream_notification_callback() |
{{#set: page title=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
- php.net: stream_notification_callback()
