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 в разі помилки.

Приклади

Приклад #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

add a note add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top