update : 2015.11.03
php.shukuma.com

검색:
 
 
Decode chunked-encoded data

http_chunked_decode

(PECL pecl_http >= 0.1.0)

http_chunked_decodeDecode chunked-encoded data

설명

string http_chunked_decode ( string $encoded )

Decodes a string which is HTTP-chunked encoded.

인수

encoded

chunked encoded string

반환값

Returns the decoded string on success실패 시 FALSE를 반환합니다.

예제

Example #1 A http_chunked_decode() example

<?php
$string 
"".
    
"05\r\n".
    
"this \r\n".
    
"07\r\n".
    
"string \r\n".
    
"12\r\n".
    
"is chunked encoded\r\n".
    
"01\n\r\n".
    
"00";
echo 
http_chunked_decode($string);
?>

위 예제의 출력:

this string is chunked encoded