mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
WS and typos, removed the author feelings about the function as I just used it for a deamon and it _was_ handy
also added a basic example git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@167944 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
d215309d8d
commit
580f15d31d
1 changed files with 24 additions and 7 deletions
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.4 $ -->
|
||||
<!-- $Revision: 1.5 $ -->
|
||||
<!-- splitted from ./en/functions/imap.xml, last change in rev 1.2 -->
|
||||
<refentry id="function.imap-ping">
|
||||
<refnamediv>
|
||||
|
@ -16,12 +16,29 @@
|
|||
Returns &true; if the stream is still alive, &false; otherwise.
|
||||
</para>
|
||||
<para>
|
||||
<function>imap_ping</function> function pings the stream to see
|
||||
it is still active. It may discover new mail; this is the
|
||||
preferred method for a periodic "new mail check" as well as a
|
||||
"keep alive" for servers which have inactivity timeout.
|
||||
(As PHP scripts do not tend to run that long, I can hardly
|
||||
imagine that this function will be useful to anyone.)
|
||||
<function>imap_ping</function> pings the stream to see if it's still
|
||||
active. It may discover new mail; this is the preferred method for a
|
||||
periodic "new mail check" as well as a "keep alive" for servers which
|
||||
have inactivity timeout.
|
||||
</para>
|
||||
<para>
|
||||
<example>
|
||||
<title><function>imap_ping</function> Example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
$imap = imap_open("{your.imap.host}", "mailadmin", "password");
|
||||
|
||||
// after some sleeping
|
||||
if (!imap_ping($imap)) {
|
||||
// do some stuff to reconnect
|
||||
}
|
||||
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
|
Loading…
Reference in a new issue