ID:               36072
 User updated by:  ceo at l-i-e dot com
 Reported By:      ceo at l-i-e dot com
-Status:           Bogus
+Status:           Open
 Bug Type:         Feature/Change Request
 Operating System: *
 PHP Version:      *
 New Comment:

Errrr. If you read the actual Feature Request, I think it's pretty
clear that RTFM stream_set_timeout won't cut it...

stream_set_timeout is useful only AFTER a stream is open.

fopen() gives no control (tho fsockopen() does) over connection
timeout.

But fsockopen is missing all the great stuff in fopen() that takes care
of.

I really don't think I'm being an idiot here...  Honest.


Previous Comments:
------------------------------------------------------------------------

[2006-01-18 21:24:49] [EMAIL PROTECTED]

Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.

RTFM: stream_set_timeout(), context of fopen(), streams section in
manual

------------------------------------------------------------------------

[2006-01-18 21:16:55] ceo at l-i-e dot com

Description:
------------
I love the simplicity of fopen() that takes most URLs / files /
whatever and does what I want.

Do whatever it takes to start sending me the data.

I NEED the ability to set the time-out for the opening, as well as the
time-out after the stream has opened.

I'm stuck with duplicating whatever code is down in fopen() in my own
PHP code to detect and initiate protocol specific minutia because
fopen() has no user-configurable timeout, but fsockopen doesn't do all
that.
$parts = parse_url($url);
extract($parts);
switch($scheme){
case 'http': fputs("GET $path HTTP/1.0\n"); fputs("Host: $host\n");
break;
case 'ftp': fputs("GET $path\n"); break;
.
.
.
}

I REALLY don't want to re-invent the wheel here, when I know that code
is down in the guts of fopen()

A function stream_set_connection_timeout() to let me tell PHP how long
fopen() should wait would make life way more better for many users, I
believe.


Expected result:
----------------
The PHP Dev Team is going to add this function because YOU ROCK!
:-)




------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=36072&edit=1

Reply via email to