----- Original Message ----- From: "jarell" <[EMAIL PROTECTED]>
To: "John Holmes" <[EMAIL PROTECTED]>
Sent: Wednesday, September 01, 2004 2:05 PM
Subject: Re: [PHP] stream wrappers



Does the stream_open function in your example actually check if the file has already
been downloaded?

No... I don't know how you're doing that, so it's up to you to write.

I got an error. failed to open stream: infinite recursion prevented in..
But that's probably my fault since if I change $path to the literal location of the file it works.

You need to strip the custom protocol from $path. $path is "mystream://path/to/file" for example and you need to strip off the "mystream://", otherwise you're creating the infinite loop by trying to open the same custom stream again and again and again... I just went through this with some of my own code. :)


I made a function which updates the database and put it in the stream_close
function (and tried it in the stream_eof function). But it seems that if you leave the dialog box
("Save to disk" or "Open with..") open for a while and then hit cancel, it still logs it as a download.


Is there any way to tell the server to not read the file until the user starts downloading?
Or is there someting to do in the stream wrapper?

how are you actually using this wrapper is the question... show some code.

FYI, please include any replies to the list. Others will benefit from this conversation and so will the archives. :)

---John Holmes...

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



Reply via email to