|  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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
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-2021 The PHP Group
All rights reserved.
Last updated: Thu Oct 28 02:03:35 2021 UTC