|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2002-06-16 10:02 UTC] mfischer@php.net
The 'zcontext' parameter is not documented. It allows the reusing of an already stream (?), docs and examples should be really done. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 01:00:01 2025 UTC |
I still don't have time to properly document this, but I'm pasting part of my email conversation with Philip here, just in case someone else does get the time before I do. Thanks very much to Philip for the effort in researching this stuff! Wez said: > The concept is this: > Sometimes it is useful to specify some more advanced tuning paramters > for a file (or stream) before it is opened. In the case of HTTP, > it is also useful to be able to share context settings - the main > thing here is to store cookies from one request and then use them > for subsequent fopen("http://...") requests. > > This concept was expanded to allow callbacks to monitor progress: > you should be able to find more details on this on the marc archives - > search for something like "stream progress notification"; this was > implemented in response to someone requesting the feature for FTP, > so adding FTP in there might help narrow the search. > > The context functions were (re)named as follows: > > stream_context_create() > stream_context_get_options() > stream_context_set_option() > stream_context_set_params() > > Context parameters have the following structure, much like an > array, so I'll display it like an array: > > context => array( > notification => callback for notification function > options => array( > http => array(optionname => optionvalue) // for http > ftp => ftp wrapper options > ... => other wrapper options > ) > ) > > ATM, only the notification parameter has been set and no options > for the other wrappers have been finalized, so it only makes sense > to document that part of it right now. And Philip said: Feel free to add the information below to the bug report, I unassigned myself, and wrote all the information I knew into it. See: http://bugs.php.net/bug.php?id=17784 Btw, that thread you speak of (stream progress notification" is here: RFC: stream notification handlers http://marc.theaimsgroup.com/?l=php-dev&m=101826854819192 Somehow I missed it. Hopefully if you mention the stuff below in that report someone will document it. Sorry I can't :( Btw, this is some cool stuff! I'm slowly understanding it.