|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #24505 http_request() function
Submitted: 2003-07-05 00:23 UTC Modified: 2015-03-27 14:27 UTC
Avg. Score:3.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: firewolf at pochtampt dot ru Assigned:
Status: Not a bug Package: HTTP related
PHP Version: * OS: *
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: firewolf at pochtampt dot ru
New email:
PHP Version: OS:


 [2003-07-05 00:23 UTC] firewolf at pochtampt dot ru
function fopen(),
when I open http://somesite/somefile
I can't use reget, because server response:
HTTP/1.0 206 Partial content... and php log error.

Its possible when I make content:

$opts = array('http'=>array('user_agent'                                  => "USER_AGET NAME\r\nRange: bytes=2000-\r\n"));
$context = stream_context_create($opts);
$fl = fopen("$url","r",false,$context);

Reproduce code:
line 300: 
switch(response_code) {
                                case 200:
                                case 302:
                                case 301:
                                        reqok = 1;
                                case 403:

Expected result:
line 300: 
switch(response_code) {
                                case 200:
                                case 206:
                                case 302:
                                case 301:
                                        reqok = 1;
                                case 403:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2003-07-05 03:22 UTC]
We won't be overloading fopen() to handle partial fetches.
However, we are looking at adding some kind of http_request() function that can include this kind of feature.

 [2005-03-07 04:19 UTC] rwilliams at warren-wilson dot edu
I would like to see this bug amended. I don't see how it 
would require overloading to address the issue but only 
the change in the switch statement as pictured.
 [2005-12-05 14:45 UTC]
I'm not going to have time to implement this myself.
 [2010-11-18 23:11 UTC]
-Summary: feature request: http_request() function +Summary: http_request() function -Package: Feature/Change Request +Package: HTTP related -Operating System: N/A +Operating System: * -PHP Version: N/A +PHP Version: *
 [2015-03-27 14:27 UTC]
-Status: Open +Status: Not a bug
 [2015-03-27 14:27 UTC]
Thank you for taking the time to report a problem with PHP.
Unfortunately you are not using a current version of PHP -- 
the problem might already be fixed. Please download a new
PHP version from

If you are able to reproduce the bug with one of the latest
versions of PHP, please change the PHP version on this bug report
to the version you tested and change the status back to "Open".
Again, thank you for your continued support of PHP.

PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Fri Aug 06 03:01:24 2021 UTC