PHP: stream_get_filters - Manual

downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

stream_get_line stream_get_contents

Last updated: Sat, 27 Jan 2007

view this page in

# stream_get_filters

(PHP 5)

stream_get_filters -- Retrieve list of registered filters

## Description

array stream_get_filters ( void )

Returns an indexed array containing the name of all stream filters available on the running system.

Пример 1. Using stream_get_filters()

`<?php $streamlist = stream_get_filters(); print_r($streamlist); ?>`

Output will be similar to the following. Note: there may be more or fewer filters in your version of PHP.

    Array (
      [0] => string.rot13
      [1] => string.toupper
      [2] => string.tolower
      [3] => string.base64
      [4] => string.quoted-printable
    )

See also stream_filter_register(), and stream_get_wrappers().

add a note User Contributed Notes
stream_get_filters
Jasper Bekkers
05-Oct-2005 11:53
`Filters to be used within the convert filter are base64-encode, base64-decode, quoted-printable-encode and quoted-printable-decode. Note: those are not in the string filter, as currently reported by the manual!
Example usage is:
<?php
$h = fopen('gecodeerd.txt', 'r');
stream_filter_append($h, 'convert.base64-decode');
fpassthru($h);
fclose($h);
?>
Or
<?php
$filter = 'convert.base64-decode';
$file = 'coded.txt';
$h = fopen('php://filter/read=' . $filter . '/resource=' . $file,'r');
fpassthru($h);
fclose($h);
?>`
add a note
stream_get_line stream_get_contents

Last updated: Sat, 27 Jan 2007
show source | credits | stats | sitemap | contact | advertising | mirror sites
Copyright © 2001-2007 The PHP Group
All rights reserved.
This mirror generously provided by: Yahoo! Inc.
Last updated: Sat Mar 10 10:36:09 2007 PST