|  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
 [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: Sun Jun 23 21:01:30 2024 UTC