- file_get_contents: documentation ( source)
- stream_context_set_default: documentation ( source)
- var_dump: documentation ( source)
- stream_context_set_params: documentation ( source)
<?php
$cb = function ($notification_code , $severity , $message , $message_code , $bytes_transferred , $bytes_max)
{
var_dump(func_get_args());
};
$ctx = stream_context_set_default(['http' => []]);
stream_context_set_params($ctx, array('notification' => $cb));
file_get_contents("http://www.free.fr");