[PHP-DEV] [Sorta OT] Mystery zcontext?

2002-11-05 Thread John Coggeshall

I was digging around the ext/standard today and I wanted to do something
with the file access stuff, however I'm a bit lost on something... I'd
appreciate it if someone could explain this (as it's basically
undocumented).

What is the fourth parameter for the fopen() function? It's listed as a
resource, and there is some mention of using callbacks, etc But I
can't pin it down looking at the code... Anyone care to comment what the
zcontext parameter does? 

John


|-Original Message-
|From: Melvyn Sopacua [mailto:msopacua;idg.nl] 
|Sent: Tuesday, November 05, 2002 12:38 PM
|To: Adam Voigt
|Cc: [EMAIL PROTECTED]
|Subject: Re: [PHP-DEV] Core Component
|
|
|At 12:29 11/5/2002 -0500, Adam Voigt wrote:
|
|Just curious, someone asked me why isn't PEAR (specifically the DB
|abstraction) directly written into the PHP engine (in C or 
|whatever PHP 
|itself is written in) and I couldn't come up with an answer so I 
|thought I'd ask here.
|
|For the exact same reasons people use PHP instead of C.
|
|
|Met vriendelijke groeten / With kind regards,
|
|Webmaster IDG.nl
|Melvyn Sopacua
|
|@Logan I spent a minute looking at my own code by accident. 
|@Logan I was thinking What the hell is this guy doing?
|
|
|-- 
|PHP Development Mailing List http://www.php.net/
|To unsubscribe, visit: http://www.php.net/unsub.php
|
|


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] [Sorta OT] Mystery zcontext?

2002-11-05 Thread Wez Furlong
Hi John,

It's for some funky stuff that won't really come into it's own until
version 5 of PHP.

ATM, you can use stream_context_XXX family of functions to do:

o Set notification callbacks.  These can be used to implement progress
bars for event driven applications.

o Set parameters for the various URL wrappers. For http you can set the
user-agent header.

The context can be shared between multiple streams, and once the curl
library has enough hooks, the curlwrappers will use the context to do
things like store session cookies.

There is a documentation bug about this that might have a little bit
more info.

--Wez.

On Tue, 5 Nov 2002, John Coggeshall wrote:


 I was digging around the ext/standard today and I wanted to do something
 with the file access stuff, however I'm a bit lost on something... I'd
 appreciate it if someone could explain this (as it's basically
 undocumented).

 What is the fourth parameter for the fopen() function? It's listed as a
 resource, and there is some mention of using callbacks, etc But I
 can't pin it down looking at the code... Anyone care to comment what the
 zcontext parameter does?

 John



-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php