ID: 39745 Updated by: [EMAIL PROTECTED] Reported By: siegfri3d at gmail dot com -Status: Open +Status: Bogus Bug Type: Streams related Operating System: Linux debian sid, windows xp sp2 PHP Version: 5.2.0 New Comment:
Well, www.google.it just doesn't support it. You can verify it with www.example.com, which understands Range header just fine. Previous Comments: ------------------------------------------------------------------------ [2006-12-05 17:06:49] siegfri3d at gmail dot com Description: ------------ see bug http://bugs.php.net/bug.php?id=36857 The man answered but you never replied. He also posted an example on http://it2.php.net/file_get_contents 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 php.net page Reproduce code: --------------- <?php $context=array('http' => array ('header'=> 'Range: bytes=1-20', ),); $xcontext = stream_context_create($context); $str=file_get_contents("http://www.google.it",FALSE,$xcontext); echo $str; ?> Expected result: ---------------- that it returns the 20 first bytes of www.google.it. Actual result: -------------- It returns the whole page ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=39745&edit=1