<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/refs.basic.other.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'de',
  ),
  'this' => 
  array (
    0 => 'book.stream.php',
    1 => 'Streams',
    2 => 'Streams',
  ),
  'up' => 
  array (
    0 => 'refs.basic.other.php',
    1 => 'Sonstige Grunderweiterungen',
  ),
  'prev' => 
  array (
    0 => 'function.spl-object-id.php',
    1 => 'spl_object_id',
  ),
  'next' => 
  array (
    0 => 'stream.setup.php',
    1 => 'Installation/Konfiguration',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/stream/book.xml',
  ),
  'history' => 
  array (
  ),
  'extra_header_links' => 
  array (
    'rel' => 'alternate',
    'href' => '/manual/en/feeds/book.stream.atom',
    'type' => 'application/atom+xml',
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="book.stream" class="book">
 
 <h1 class="title">Streams</h1>

  <div id="intro.stream" class="preface">
   <h1 class="title">Einführung</h1>
   <p class="simpara">
    Streams are
    the way of generalizing file, network, data compression, and other
    operations which share a common set of functions and uses.  In
    its simplest definition, a <code class="literal">stream</code> is a 
    <span class="type"><a href="language.types.resource.php" class="type resource">resource</a></span> object which exhibits streamable
    behavior.  That is, it can be read from or written to in a linear 
    fashion, and may be able to <span class="function"><a href="function.fseek.php" class="function">fseek()</a></span> to an
    arbitrary location within the stream.
   </p>
   <p class="simpara">
    A <code class="literal">wrapper</code> is additional code which tells the stream how to handle
    specific protocols/encodings.  For example, the <code class="literal">http</code>
    wrapper knows how to translate a URL into an <code class="literal">HTTP/1.0</code>
    request for a file on a remote server.  There are many wrappers
    built into PHP by default (See <a href="wrappers.php" class="xref">Unterst&uuml;tzte Protokolle und Wrapper</a>),
    and additional, custom wrappers may be added either within a
    PHP script using <span class="function"><a href="function.stream-wrapper-register.php" class="function">stream_wrapper_register()</a></span>,
    or directly from an extension.
    Because any variety of wrapper may be added to PHP, 
    there is no set limit on what can be done with them.  To access the list
    of currently registered wrappers, use <span class="function"><a href="function.stream-get-wrappers.php" class="function">stream_get_wrappers()</a></span>.
   </p>
   <p class="para">
    A stream is referenced as: <code class="parameter">scheme</code>://<code class="parameter">target</code>
    <ul class="itemizedlist">
     <li class="listitem">
      <span class="simpara">
       <code class="parameter">scheme</code> (string) -
       The name of the wrapper to be used.  Examples include: file, 
       http, https, ftp, ftps, compress.zlib, compress.bz2, and php.  See 
       <a href="wrappers.php" class="xref">Unterst&uuml;tzte Protokolle und Wrapper</a> for a list of PHP built-in wrappers.  If
       no wrapper is specified, the function default is used (typically
       <code class="literal">file</code>://).
      </span>
     </li>
     <li class="listitem">
      <span class="simpara">
       <code class="parameter">target</code> - 
       Depends on the wrapper used.  For filesystem related streams this is
       typically a path and filename of the desired file.  For network related 
       streams this is typically a hostname, often with a path appended.  Again, see
       <a href="wrappers.php" class="xref">Unterst&uuml;tzte Protokolle und Wrapper</a> for a description of targets for built-in streams.
      </span>
     </li>
    </ul>
   </p>
  </div>

 






 




 





 

 



  



 





 

 






 




 






 






 
<ul class="chunklist chunklist_book"><li><a href="stream.setup.php">Installation/Konfiguration</a><ul class="chunklist chunklist_book chunklist_children"><li><a href="stream.resources.php">Stream Classes</a></li></ul></li><li><a href="stream.constants.php">Vordefinierte Konstanten</a></li><li><a href="stream.filters.php">Stream Filters</a></li><li><a href="stream.contexts.php">Stream Contexts</a></li><li><a href="stream.errors.php">Stream Errors</a></li><li><a href="stream.examples.php">Beispiele</a><ul class="chunklist chunklist_book chunklist_children"><li><a href="stream.streamwrapper.example-1.php">Example class registered as stream wrapper</a></li></ul></li><li><a href="class.php-user-filter.php">php_user_filter</a> — The php_user_filter class<ul class="chunklist chunklist_book chunklist_children"><li><a href="php-user-filter.filter.php">php_user_filter::filter</a> — Called when applying the filter</li><li><a href="php-user-filter.onclose.php">php_user_filter::onClose</a> — Called when closing the filter</li><li><a href="php-user-filter.oncreate.php">php_user_filter::onCreate</a> — Called when creating the filter</li></ul></li><li><a href="class.streamwrapper.php">streamWrapper</a> — The streamWrapper class<ul class="chunklist chunklist_book chunklist_children"><li><a href="streamwrapper.construct.php">streamWrapper::__construct</a> — Constructs a new stream wrapper</li><li><a href="streamwrapper.destruct.php">streamWrapper::__destruct</a> — Destructs an existing stream wrapper</li><li><a href="streamwrapper.dir-closedir.php">streamWrapper::dir_closedir</a> — Close directory handle</li><li><a href="streamwrapper.dir-opendir.php">streamWrapper::dir_opendir</a> — Open directory handle</li><li><a href="streamwrapper.dir-readdir.php">streamWrapper::dir_readdir</a> — Read entry from directory handle</li><li><a href="streamwrapper.dir-rewinddir.php">streamWrapper::dir_rewinddir</a> — Rewind directory handle</li><li><a href="streamwrapper.mkdir.php">streamWrapper::mkdir</a> — Create a directory</li><li><a href="streamwrapper.rename.php">streamWrapper::rename</a> — Renames a file or directory</li><li><a href="streamwrapper.rmdir.php">streamWrapper::rmdir</a> — Removes a directory</li><li><a href="streamwrapper.stream-cast.php">streamWrapper::stream_cast</a> — Retrieve the underlying resource</li><li><a href="streamwrapper.stream-close.php">streamWrapper::stream_close</a> — Close a resource</li><li><a href="streamwrapper.stream-eof.php">streamWrapper::stream_eof</a> — Tests for end-of-file on a file pointer</li><li><a href="streamwrapper.stream-flush.php">streamWrapper::stream_flush</a> — Flushes the output</li><li><a href="streamwrapper.stream-lock.php">streamWrapper::stream_lock</a> — Advisory file locking</li><li><a href="streamwrapper.stream-metadata.php">streamWrapper::stream_metadata</a> — Change stream metadata</li><li><a href="streamwrapper.stream-open.php">streamWrapper::stream_open</a> — Opens file or URL</li><li><a href="streamwrapper.stream-read.php">streamWrapper::stream_read</a> — Read from stream</li><li><a href="streamwrapper.stream-seek.php">streamWrapper::stream_seek</a> — Seeks to specific location in a stream</li><li><a href="streamwrapper.stream-set-option.php">streamWrapper::stream_set_option</a> — Change stream options</li><li><a href="streamwrapper.stream-stat.php">streamWrapper::stream_stat</a> — Retrieve information about a file resource</li><li><a href="streamwrapper.stream-tell.php">streamWrapper::stream_tell</a> — Retrieve the current position of a stream</li><li><a href="streamwrapper.stream-truncate.php">streamWrapper::stream_truncate</a> — Truncate stream</li><li><a href="streamwrapper.stream-write.php">streamWrapper::stream_write</a> — Write to stream</li><li><a href="streamwrapper.unlink.php">streamWrapper::unlink</a> — Delete a file</li><li><a href="streamwrapper.url-stat.php">streamWrapper::url_stat</a> — Retrieve information about a file</li></ul></li><li><a href="ref.stream.php">Stream-Funktionen</a><ul class="chunklist chunklist_book chunklist_children"><li><a href="function.stream-bucket-append.php">stream_bucket_append</a> — Append bucket to brigade</li><li><a href="function.stream-bucket-make-writeable.php">stream_bucket_make_writeable</a> — Returns a bucket object from the brigade to operate on</li><li><a href="function.stream-bucket-new.php">stream_bucket_new</a> — Create a new bucket for use on the current stream</li><li><a href="function.stream-bucket-prepend.php">stream_bucket_prepend</a> — Prepend bucket to brigade</li><li><a href="function.stream-context-create.php">stream_context_create</a> — Creates a stream context</li><li><a href="function.stream-context-get-default.php">stream_context_get_default</a> — Retrieve the default stream context</li><li><a href="function.stream-context-get-options.php">stream_context_get_options</a> — Retrieve options for a stream/wrapper/context</li><li><a href="function.stream-context-get-params.php">stream_context_get_params</a> — Retrieves parameters from a context</li><li><a href="function.stream-context-set-default.php">stream_context_set_default</a> — Set the default stream context</li><li><a href="function.stream-context-set-option.php">stream_context_set_option</a> — Sets an option for a stream/wrapper/context</li><li><a href="function.stream-context-set-options.php">stream_context_set_options</a> — Sets options on the specified context</li><li><a href="function.stream-context-set-params.php">stream_context_set_params</a> — Set parameters for a stream/wrapper/context</li><li><a href="function.stream-copy-to-stream.php">stream_copy_to_stream</a> — Copies data from one stream to another</li><li><a href="function.stream-filter-append.php">stream_filter_append</a> — Attach a filter to a stream</li><li><a href="function.stream-filter-prepend.php">stream_filter_prepend</a> — Attach a filter to a stream</li><li><a href="function.stream-filter-register.php">stream_filter_register</a> — Register a user defined stream filter</li><li><a href="function.stream-filter-remove.php">stream_filter_remove</a> — Remove a filter from a stream</li><li><a href="function.stream-get-contents.php">stream_get_contents</a> — Reads remainder of a stream into a string</li><li><a href="function.stream-get-filters.php">stream_get_filters</a> — Retrieve list of registered filters</li><li><a href="function.stream-get-line.php">stream_get_line</a> — Gets line from stream resource up to a given delimiter</li><li><a href="function.stream-get-meta-data.php">stream_get_meta_data</a> — Retrieves header/meta data from streams/file pointers</li><li><a href="function.stream-get-transports.php">stream_get_transports</a> — Retrieve list of registered socket transports</li><li><a href="function.stream-get-wrappers.php">stream_get_wrappers</a> — Retrieve list of registered streams</li><li><a href="function.stream-is-local.php">stream_is_local</a> — Checks if a stream is a local stream</li><li><a href="function.stream-isatty.php">stream_isatty</a> — Check if a stream is a TTY</li><li><a href="function.stream-notification-callback.php">stream_notification_callback</a> — A callback function for the notification context parameter</li><li><a href="function.stream-register-wrapper.php">stream_register_wrapper</a> — Alias von stream_wrapper_register</li><li><a href="function.stream-resolve-include-path.php">stream_resolve_include_path</a> — Resolve filename against the include path</li><li><a href="function.stream-select.php">stream_select</a> — Runs the equivalent of the select() system call on the given
   arrays of streams with a timeout specified by seconds and microseconds</li><li><a href="function.stream-set-blocking.php">stream_set_blocking</a> — Set blocking/non-blocking mode on a stream</li><li><a href="function.stream-set-chunk-size.php">stream_set_chunk_size</a> — Set the stream chunk size</li><li><a href="function.stream-set-read-buffer.php">stream_set_read_buffer</a> — Set read file buffering on the given stream</li><li><a href="function.stream-set-timeout.php">stream_set_timeout</a> — Set timeout period on a stream</li><li><a href="function.stream-set-write-buffer.php">stream_set_write_buffer</a> — Sets write file buffering on the given stream</li><li><a href="function.stream-socket-accept.php">stream_socket_accept</a> — Accept a connection on a socket created by stream_socket_server</li><li><a href="function.stream-socket-client.php">stream_socket_client</a> — Open Internet or Unix domain socket connection</li><li><a href="function.stream-socket-enable-crypto.php">stream_socket_enable_crypto</a> — Turns encryption on/off on an already connected socket</li><li><a href="function.stream-socket-get-name.php">stream_socket_get_name</a> — Retrieve the name of the local or remote sockets</li><li><a href="function.stream-socket-pair.php">stream_socket_pair</a> — Creates a pair of connected, indistinguishable socket streams</li><li><a href="function.stream-socket-recvfrom.php">stream_socket_recvfrom</a> — Receives data from a socket, connected or not</li><li><a href="function.stream-socket-sendto.php">stream_socket_sendto</a> — Sends a message to a socket, whether it is connected or not</li><li><a href="function.stream-socket-server.php">stream_socket_server</a> — Create an Internet or Unix domain server socket</li><li><a href="function.stream-socket-shutdown.php">stream_socket_shutdown</a> — Shutdown a full-duplex connection</li><li><a href="function.stream-supports-lock.php">stream_supports_lock</a> — Tells whether the stream supports locking</li><li><a href="function.stream-wrapper-register.php">stream_wrapper_register</a> — Register a URL wrapper implemented as a PHP class</li><li><a href="function.stream-wrapper-restore.php">stream_wrapper_restore</a> — Restores a previously unregistered built-in wrapper</li><li><a href="function.stream-wrapper-unregister.php">stream_wrapper_unregister</a> — Unregister a URL wrapper</li></ul></li></ul></div><?php manual_footer($setup); ?>