| 
        php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits             
             [2009-03-24 23:50 UTC] iliaa@php.net
  [2009-03-25 12:18 UTC] marques at displague dot com
  [2011-12-30 13:42 UTC] alpegalpeg at gmail dot com
  | 
    |||||||||||||||||||||||||||
            
                 
                Copyright © 2001-2025 The PHP GroupAll rights reserved.  | 
        Last updated: Tue Nov 04 10:00:02 2025 UTC | 
Description: ------------ file_get_contents() does not decode HTTP content sent with "Transfer-Encoding: chunked". This is probably also true for fopen() and other HTTP stream handlers in PHP. RFC2616 section 3.6.1: All HTTP/1.1 applications MUST be able to receive and decode the "chunked" transfer-coding, and MUST ignore chunk-extension extensions they do not understand. Reproduce code: --------------- echo file_get_contents('somechunkedurl.html'); Expected result: ---------------- This is the data in the first chunk and this is the second one Actual result: -------------- 23 This is the data in the first chunk 1A and this is the second one 0