Sophie

Sophie

distrib > Mandriva > 9.1 > ppc > media > main > by-pkgid > 0afeee9cca140e167a996902b9a677c5 > files > 2534

php-manual-en-4.3.0-2mdk.noarch.rpm

<HTML
><HEAD
><TITLE
>stream_get_meta_data</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
REL="HOME"
TITLE="PHP Manual"
HREF="index.html"><LINK
REL="UP"
TITLE="Stream functions"
HREF="ref.stream.html"><LINK
REL="PREVIOUS"
TITLE="stream_get_filters"
HREF="function.stream-get-filters.html"><LINK
REL="NEXT"
TITLE="stream_get_wrappers"
HREF="function.stream-get-wrappers.html"><META
HTTP-EQUIV="Content-type"
CONTENT="text/html; charset=ISO-8859-1"></HEAD
><BODY
CLASS="refentry"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>PHP Manual</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="function.stream-get-filters.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="function.stream-get-wrappers.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><H1
><A
NAME="function.stream-get-meta-data"
></A
>stream_get_meta_data</H1
><DIV
CLASS="refnamediv"
><A
NAME="AEN88483"
></A
><P
>    (PHP 4 &#62;= 4.3.0)</P
>stream_get_meta_data&nbsp;--&nbsp;Retrieves header/meta data from streams/file pointers</DIV
><DIV
CLASS="refsect1"
><A
NAME="AEN88486"
></A
><H2
>Description</H2
>array <B
CLASS="methodname"
>stream_get_meta_data</B
> ( resource stream)<BR
></BR
><P
>&#13;     Returns information about an existing <TT
CLASS="parameter"
><I
>stream</I
></TT
>.
     The stream can be any stream created by <A
HREF="function.fopen.html"
><B
CLASS="function"
>fopen()</B
></A
>,
     <A
HREF="function.fsockopen.html"
><B
CLASS="function"
>fsockopen()</B
></A
> and <A
HREF="function.pfsockopen.html"
><B
CLASS="function"
>pfsockopen()</B
></A
>.
     The result array contains the following items:
    </P
><P
></P
><UL
><LI
><P
>&#13;       <TT
CLASS="parameter"
><I
>timed_out</I
></TT
> (bool) - <TT
CLASS="constant"
><B
>TRUE</B
></TT
> if the stream
       timed out while waiting for data on the last call to
       <A
HREF="function.fread.html"
><B
CLASS="function"
>fread()</B
></A
> or <A
HREF="function.fgets.html"
><B
CLASS="function"
>fgets()</B
></A
>.
      </P
></LI
><LI
><P
>&#13;       <TT
CLASS="parameter"
><I
>blocked</I
></TT
> (bool) - <TT
CLASS="constant"
><B
>TRUE</B
></TT
> if the stream is
       in blocking IO mode. See <A
HREF="function.socket-set-blocking.html"
><B
CLASS="function"
>socket_set_blocking()</B
></A
>.
      </P
></LI
><LI
><P
>&#13;       <TT
CLASS="parameter"
><I
>eof</I
></TT
> (bool) - <TT
CLASS="constant"
><B
>TRUE</B
></TT
> if the stream has reached
       end-of-file.  Note that for socket streams this member can be <TT
CLASS="constant"
><B
>TRUE</B
></TT
>
       even when <TT
CLASS="parameter"
><I
>unread_bytes</I
></TT
> is non-zero.  To
       determine if there is more data to be read, use
       <A
HREF="function.feof.html"
><B
CLASS="function"
>feof()</B
></A
> instead of reading this item.
      </P
></LI
><LI
><P
>&#13;       <TT
CLASS="parameter"
><I
>unread_bytes</I
></TT
> (int) - the number of bytes
       currently contained in the read buffer.
      </P
></LI
></UL
><P
>&#13;     The following items were added in PHP 4.3:
    </P
><P
></P
><UL
><LI
><P
>&#13;       <TT
CLASS="parameter"
><I
>stream_type</I
></TT
> (string) - a label describing
       the underlying implementation of the stream.
      </P
></LI
><LI
><P
>&#13;       <TT
CLASS="parameter"
><I
>wrapper_type</I
></TT
> (string) - a label describing
       the protocol wrapper implementation layered over the stream.
       See <A
HREF="wrappers.html"
>Appendix I</A
> for more information about wrappers.
      </P
></LI
><LI
><P
>&#13;       <TT
CLASS="parameter"
><I
>wrapper_data</I
></TT
> (mixed) - wrapper specific
       data attached to this stream.  See <A
HREF="wrappers.html"
>Appendix I</A
> for
       more information about wrappers and their wrapper data.
      </P
></LI
><LI
><P
>&#13;       <TT
CLASS="parameter"
><I
>filters</I
></TT
> (array) - and array containing
       the names of any filters that have been stacked onto this stream.
       Filters are currently undocumented.
      </P
></LI
></UL
><DIV
CLASS="note"
><BLOCKQUOTE
CLASS="note"
><P
><B
>Note: </B
>
      This function was introduced in PHP 4.3, but prior to this version,
      <A
HREF="function.socket-get-status.html"
><B
CLASS="function"
>socket_get_status()</B
></A
> could be used to retrieve
      the first four items, for <SPAN
CLASS="emphasis"
><I
CLASS="emphasis"
>socket based streams only</I
></SPAN
>.
     </P
><P
>&#13;      In PHP 4.3 and later,
      <A
HREF="function.socket-get-status.html"
><B
CLASS="function"
>socket_get_status()</B
></A
> is an alias for this function.
     </P
></BLOCKQUOTE
></DIV
><DIV
CLASS="note"
><BLOCKQUOTE
CLASS="note"
><P
><B
>Note: </B
>This function does NOT work on sockets created by the <A
HREF="ref.sockets.html"
>Socket extension</A
>.
     </P
></BLOCKQUOTE
></DIV
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="function.stream-get-filters.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
ACCESSKEY="H"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="function.stream-get-wrappers.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>stream_get_filters</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="ref.stream.html"
ACCESSKEY="U"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>stream_get_wrappers</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>