|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #39745 can't get partial contents with streams
Submitted: 2006-12-05 17:06 UTC Modified: 2006-12-05 18:45 UTC
From: siegfri3d at gmail dot com Assigned:
Status: Not a bug Package: Streams related
PHP Version: 5.2.0 OS: Linux debian sid, windows xp sp2
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: siegfri3d at gmail dot com
New email:
PHP Version: OS:


 [2006-12-05 17:06 UTC] siegfri3d at gmail dot com
see bug
The man answered but you never replied.
He also posted an example on on how to get a partial content with file_get_contents, it was working according to him, now it doesn't work anymore. For me it returns the whole content, maybe the syntax is wrong? If so it would be nice to correct it on the page

Reproduce code:
$context=array('http' => array ('header'=> 'Range: bytes=1-20', ),);
$xcontext = stream_context_create($context);
echo $str;

Expected result:
that it returns the 20 first bytes of

Actual result:
It returns the whole page


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2006-12-05 18:45 UTC]
Well, just doesn't support it.
You can verify it with, which understands Range header just fine.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue May 28 18:01:32 2024 UTC