Podręcznik PHP
Poprzedni |  | Następny

# XLII. IMAP, POP3 and NNTP functions

# Wprowadzenie

These functions are not limited to the IMAP protocol, despite their name. The underlying c-client library also supports NNTP, POP3 and local mailbox access methods.

# Wymagania

This extension requires the c-client library to be installed. Grab the latest version from ftp://ftp.cac.washington.edu/imap/ and compile it.

It's important that you do not copy the IMAP source files directly into the system include directory as there may be conflicts. Instead, create a new directory inside the system include directory, such as `/usr/local/imap-2000b/` (location and name depend on your setup and IMAP version), and inside this new directory create additional directories named `lib/` and `include/`. From the `c-client` directory from your IMAP source tree, copy all the `*.h` files into `include/` and all the `*.c` files into `lib/`. Additionally when you compiled IMAP, a file named `c-client.a` was created. Also put this in the `lib/` directory but rename it as `libc-client.a`.

> Notatka: To build the c-client library with SSL or/and Kerberos support read the docs supplied with the package.

# Instalacja

To get these functions to work, you have to compile PHP with `--with-imap[=DIR]`, where DIR is the c-client install prefix. From our example above, you would use `--with-imap=/usr/local/imap-2000b`. This location depends on where you created this directory according to the description above. Windows users may include the `php_imap.dll` DLL in `php.ini`

> Notatka: Depending how the c-client was configured, you might also need to add `--with-imap-ssl=/path/to/openssl/` and/or `--with-kerberos=/path/to/kerberos` into the PHP configure line.

Ostrzeżenie
Rozszerzenie IMAP nie może być używane w połączeniu z rozszerzeniami recode i YAZ. Dzieje się tak z powodu dzielenia tego samego symbolu wewnętrznego.

# Konfiguracja startowa

To rozszerzenie nie definiuje posiada żadnych dyrektyw konfiguracyjnych w pliku `php.ini`.

# Typy zasobów

# Predefiniowane stałe

Poniższe stałe są zdefiniowane w tym rozszerzeniu i stają się dostępne, gdy rozszerzenie jest dokompilowane do PHP, lub załadowane dynamicznie przy starcie.

`NIL` (integer)

`OP_DEBUG` (integer)

`OP_READONLY` (integer)

`OP_ANONYMOUS` (integer)

`OP_SHORTCACHE` (integer)

`OP_SILENT` (integer)

`OP_PROTOTYPE` (integer)

`OP_HALFOPEN` (integer)

`OP_EXPUNGE` (integer)

`OP_SECURE` (integer)

`CL_EXPUNGE` (integer)

`FT_UID` (integer)

`FT_PEEK` (integer)

`FT_NOT` (integer)

`FT_INTERNAL` (integer)

`FT_PREFETCHTEXT` (integer)

`ST_UID` (integer)

`ST_SILENT` (integer)

`ST_SET` (integer)

`CP_UID` (integer)

`CP_MOVE` (integer)

`SE_UID` (integer)

`SE_FREE` (integer)

`SE_NOPREFETCH` (integer)

`SO_FREE` (integer)

`SO_NOSERVER` (integer)

`SA_MESSAGES` (integer)

`SA_RECENT` (integer)

`SA_UNSEEN` (integer)

`SA_UIDNEXT` (integer)

`SA_UIDVALIDITY` (integer)

`SA_ALL` (integer)

`LATT_NOINFERIORS` (integer)

`LATT_NOSELECT` (integer)

`LATT_MARKED` (integer)

`LATT_UNMARKED` (integer)

`SORTDATE` (integer)

`SORTARRIVAL` (integer)

`SORTFROM` (integer)

`SORTSUBJECT` (integer)

`SORTTO` (integer)

`SORTCC` (integer)

`SORTSIZE` (integer)

`TYPETEXT` (integer)

`TYPEMULTIPART` (integer)

`TYPEMESSAGE` (integer)

`TYPEAPPLICATION` (integer)

`TYPEAUDIO` (integer)

`TYPEIMAGE` (integer)

`TYPEVIDEO` (integer)

`TYPEOTHER` (integer)

`ENC7BIT` (integer)

`ENC8BIT` (integer)

`ENCBINARY` (integer)

`ENCBASE64` (integer)

`ENCQUOTEDPRINTABLE` (integer)

`ENCOTHER` (integer)

# Zobacz również

This document can't go into detail on all the topics touched by the provided functions. Further information is provided by the documentation of the c-client library source (`docs/internal.txt`). and the following RFC documents:

- RFC2821: Simple Mail Transfer Protocol (SMTP).

- RFC2822: Standard for ARPA internet text messages.

- RFC2060: Internet Message Access Protocol (IMAP) Version 4rev1.

- RFC1939: Post Office Protocol Version 3 (POP3).

- RFC977: Network News Transfer Protocol (NNTP).

- RFC2076: Common Internet Message Headers.

- RFC2045 , RFC2046 , RFC2047 , RFC2048 & RFC2049: Multipurpose Internet Mail Extensions (MIME).

A detailed overview is also available in the books Programming Internet Email by David Wood and Managing IMAP by Dianna Mullet & Kevin Mullet.

Poprzedni | Spis treści | Następny
read_exif_data | Początek rozdziału | imap_8bit