����������
WEB - ������

www.spravkaweb.ru Rambler's Top100
 ï¿½ï¿½ ����������: �������/PHP/������� IMAP.Ðàñïå÷àòàòü 
�������
�������
����� ���
HTML
JavaScript
VBScript
CSS
Flash
Perl
PHP
MySQL
SSI
VRML
�������������
������
Download
�����
��������
������
�������� ���
�����:
��������
Subscribe.Ru:

PHP

<--����� | ��������� � ������ | ������-->
������� IMAP
��� ����, ����� ��� ������� ���������� �� ������ �������������� PHP � ������ --with-imap.
���� ���� ������,����� ���� ����������� ���������� c-client. ��������� ������ ����� �������� �� ������ ftp://ftp.cac.washington.edu/imap/.
����� ���������� c-client/c-client.a � /usr/local/lib ��� ����� ���� ������ ����������, ����������� � ����, ��������������� c-client/rfc822.h, mail.h � linkage.h � /usr/local/include ��� ������ ���������� � include-�������.

�� ������ �� ��� ������, ��������� � ��� ������� ��������� ��������� ����� ����� ������ �������� ��������, ��������� �� ����� �������� ������������� ��������� IMAP. ������� � ������ ���������� C-������� ����� ������������ NNTP, POP3 � ������ ������� � ��������� �������� ������.
imap_append
��������� ��������� ��������� � ��������� �������� ����.

��������� :
int imap_append(int imap_stream, string mbox, string message, stringflags);

���������� true � ������ ������ ��� false �����.
imap_append() ��������� ��������� ��������� � ��������� �������� ���� mbox. ���� ������� �������������� �����, ����� ���������� � �������� ���� � �����. ��� ������� � �������� Cyrus IMAP ����� ������������ � �������� ������������� ������ "\r\n" ������ "\n",����� �������� �� ����������.

imap_base64
���������� �����, �������������� � ������� BASE64.

��������� :
string imap_base64(string text);

������� imap_base64() ���������� ����� � ������� BASE-64. �������������� ��������� ������������ ��� ������.

imap_body
������ ���� ���������.

��������� :
string imap_body(int imap_stream, int msg_number, int flags);

������� imap_body() ���������� ���� ���������, �������� ����� �/� msg_number � ������� �������� �����.
�������������� ����� ��� ������� ����� ��
FT_UID - ����� ��������� msgno �������� UID-�� ���������
FT_PEEK - �� ������������� ���� \Seen ���� �� ��� �� ����������.
FT_INTERNAL - ������������ ������ �������� �� ���������� ������� � �� ����� ���� ��������� � ������������ ����� � CRLF.

imap_check
��������� ������� �������� ����.

��������� :
array imap_check(int imap_stream);

���������� ���������� � ������� �������� �����. � ������ �������� ���������� FALSE.
������� imap_check() ��������� ������ �������� ��������� ����� �� ������� � ���������� ���������� � ������� �� ���������� ���������� :
Date : ���� ���������
Driver : �������
Mailbox : �������� ��������� �����
Nmsgs : ���������� ���������
Recent : ���������� ������� ��������� ���������

imap_close
��������� ����� IMAP.

��������� :
int imap_close(int imap_stream, int flags);

��������� ����� imap. �������������� ���� CL_EXPUNGE ���������� ������� ���������� �� �������� ������������ ��������.

imap_createmailbox
������� ����� �������� ����.

��������� :
int imap_createmailbox(int imap_stream, string mbox);

imap_createmailbox() ������� ����� �������� ���� ��������� � mbox.���������� true � ������ ������ � false ��� ������.

imap_delete
�������� ��������� �� �������� ��������� ����� �� ��������.

��������� :
int imap_delete(int imap_stream, int msg_number);

���������� true.
���������� true.������� imap_delete() �������� ���������, ��������� ����� msg_number �� ��������. ��������� �������� ����������������������� �������� imap_expunge().

imap_deletemailbox
������� �������� ����.

��������� :
int imap_deletemailbox(int imap_stream, string mbox);

���������� true � ������ ������ � false �����.

imap_expunge
������� ��� ���������, ���������� �� ��������.

��������� :
int imap_expunge(int imap_stream);

imap_expunge() ������� ��� ��������� ���������� �� �������� � ������� imap_delete().
���������� true.

imap_fetchbody
��������� ������� ������ ���� ���������.

��������� :
string imap_fetchbody(int imap_stream, int msg_number, int part_number, flags flags);

��� ������� ���������� ������� ��������� ������ ���������� ��������� ��� ��������� ������.������ ��� ������ ����� �����, ����������� �������, ������� ��������� �� ����� ���� ��������� � ������ ������ �������� ������������ IMAP4. ����� ���� �� ������������ ���� ��������.
�������������� ���������� � imap_fetchbody () �������� ������� ����� ��
FT_UID - msgono ��������
UID-�� FT_PEEK - �� ������������� ���� \Seen ���� �� �� ����������
FT_UID - ������������ ������ �������� �� ���������� �������, ������� �� ����� ���� ��������������� � ������� CRLF

imap_fetchstructure
������ ��������� �������� ���������.

��������� :
array imap_fetchstructure(int imap_stream, int msg_number);

array imap_fetchstructure(int imap_stream, int msg_number);��� ������� ���������� ������� ��� ���������� � ��������� ��������� � ������� msg_number. ������������ ���������������� �������� �� ���������� ���������� :
type, encoding, ifsubtype, subtype, ifdescription, description, ifid, id, lines, bytes, ifparameters ���, ���������, ������ ����������, ������, �������� ����������, ��������, ������������� ����������, ������, �����, ��������� ����������
����� ������� ���������� ������ �������� ��� ��������� parameters[]. ���� ������ ����� ����������������� :
attribute, value
�������, ��������
� ������ ��������� �� ��������� ������, ������� ����� ���������� ������ �������� ���� ������� ��� �������� parts[].

imap_header
������ ��������� ���������.

��������� :
object imap_header(int imap_stream, int msg_number, int fromlength, int subjectlength, int defaulthost);

��� ������� ���������� ������ ��������� ��������� ���������
remail,date,Date,subject,Subject,in_reply_to,message_id,newsgroups, followup_to,references
toaddress (������ ������ To: ������ ������ �� 1024 ��������)
to[] (���������� ������ �������� �� ������ To, ��������:)
personal
adl
mailbox
host
fromaddress (������ ������ From: ������ ������ �� 1024 ��������)
from[] (���������� ������ �������� �� ������ From, ��������:)
personal
adl
mailbox
host
ccaddress (������ ������ Cc: ������ ������ �� 1024 ��������)
cc[] (���������� ������ �������� �� ������ Cc, ��������)
personal
adl
mailbox
host
bccaddress (������ ������ Bcc: ������ ������ �� 1024 ��������)
bcc[] (���������� ������ �������� �� ������ Bcc, ��������:)
personal
adl
mailbox
host
reply_toaddress (������ ������ Reply_to: ������ ������ �� 1024 ��������)
reply_to[] (���������� ������ �������� �� ������ Reply_to, ��������:)
personal
adl
mailbox
host
senderaddress (������ ������ Sender: ������ ������ �� 1024 ��������)
sender[] (���������� ������ �������� �� ������ Sender, ��������:)
personal
adl
mailbox
host
return_path (������ ������ Return-path: ������ ������ �� 1024 ��������)
return_path[] (���������� ������ �������� �� ������ Return_path, ��������:)
personal
adl
mailbox
host
udate ( ���� ��������� � ������� ������� unix)
fetchfrom (������ From, ����������������� �� fromlength ��������)
fetchsubject (������ Subject, ����������������� �� subjectlength ��������)

imap_headers
���������� ��������� ���� ��������� � �������� �����.

��������� :
array imap_headers(int imap_stream);

���������� ��������� ������ �� ���������� �� ���������. ���� ������� ������� �� ���������.

imap_listmailbox
������ ������ �������� ������.

��������� :
array imap_listmailbox(int imap_stream, string ref, string pat);

���������� ������, ���������� �������� �������� ������.

imap_listsubscribed
����������� ��� ����������� �����.

��������� :
array imap_listsubscribed(int imap_stream, string ref, string pattern);

���������� ������ ���� �������� ������ �� ������� �� ���������. ��������� ref � pattern ��������� �������������������������� ������ �������� ����� � ������, �������� ������ ������������� �������� �������� ������.

imap_mail_copy
�������� ��������� ��������� � �������� ����.

��������� :
int imap_mail_copy(int imap_stream, string msglist, string mbox, int flags);

���������� true � ������ ������ � false �����.
�������� �������� ��������� ��������� � ������� msglist � �������� ���� mbox. msglist - ��� ��������, � �� ������������ ���������.
����� - ��� ������� ����� ��
CP_UID - ������ � ������������������ ��������
UID-� CP_MOVE - ����� ����������� ������� ��������� �� �������� ��������� �����

imap_mail_move
��������� ��������� ��������� � �������� ����.

��������� :
int imap_mail_move(int imap_stream, string msglist, string mbox);

��������� �������� ��������� ��������� � ������� msglist � �������� ���� mbox. msglist - ��� ��������, � �� ������������ ���������.
���������� true � ������ ������ � false �����.

imap_num_msg
������ ���������� ��������� � ������� �������� �����.

��������� :
int imap_num_msg(void);

���������� ���������� ��������� � ������� �������� �����.

imap_num_recent
���������� ���������� ������� ��������� ��������� � ������� �������� �����.

��������� :
int imap_num_recent(int imap_stream);

imap_open
����������� � ������� (�������� ��������� �����).

��������� :
int imap_open(string mailbox, string username, string password [, int flags]);

������� imap_open() ���������� ���������� ��������� ����� IMAP (���������� ����������� � ������� IMAP) ��� false ��� ������.
��� ������� ����� ���� ������������ ��� �������� ������� � POP3 � NNTP ��������, �� � ���� ������ ��������� ������� ����� ����������.

�������� mailbox - ������ ��� ������� � ���� � ��������� �����. ��� ������� ������� ��������� � �������� ������ "{" � "}", ������ ������� ������ �����������: ��� ������� (��� ��� IP-�����), �������� �������� ��������� (������� ���������� �� ����� "/") � ������ ����� ��� ����, ����� �������������� � ������� IMAP �� 143-� ���� �� ��������� ������ �������� ���������:
$mbox = imap_open("{localhost:143}INBOX","user_id","password");
��� ����, ����� �������������� � POP3-������� �� 110-� ���� �� ��������� ������� �����������:
$mbox = imap_open("{localhost/pop3:110}INBOX","user_id","password");
��� ����, ����� �������������� � NNTP-������� �� 119-� ���� �� ��������� ������� �����������:
$nntp = imap_open("{localhost/nntp:119}comp.test","","");
��� ����, ����� �������������� � ���������� ������� �������� "localhost" �� ��� ��� IP-����� ������� � ���������� ������ ��������������.
����� - ������� ����� ��
OP_READONLY - ������� �������� ���� � ����� "������ ������"
OP_ANONYMOUS - �� ������������ ��� �� ��������� .newsrc ��� ������������� ��������
OP_HALFOPEN - ��� IMAP � NNTP ������������� ����������, �� �� ��������� �������� ����
CL_EXPUNGE - ������������� ������� �������� ���� ��� ��������

imap_ping
��������� ����� IMAP �� �����������������.

��������� :
int imap_ping(int imap_stream);

���������� true ���� ����� ��� �������������� � false �����.
������� imap_ping() ��������� ����� �� �����������������. �� ����� ����� ��������� ����� �����; ��� ���������������� ����� ��� ������������� �������� ����� ����� � "���������" ��������� ��������.

imap_renamemailbox
��������������� ������ �������� ���� � �����.

��������� :
int imap_renamemailbox(int imap_stream, string old_mbox, string new_mbox);

��� ������� ��������������� ������ �������� ���� � �����.
���������� true � ������ ������ � false �����.

imap_reopen
������ ��������� ����� IMAP �� ����� �������� ����.

��������� :
int imap_reopen(string imap_stream, string mailbox, string [flags]);

���������� true � ������ ������ � false �����.
��� ������� ������ ��������� ��������� ����� �� ����� ����.
����� - ������� ����� ��
OP_READONLY - ������� �������� ���� � ������ ������ ������
OP_ANONYMOUS - �� ������������ ��� �� ��������� .newsrc ��� ������ � ���������
OP_HALFOPEN - ��� IMAP � NNTP ������������� ����� �� �� ��������� �������� ����
CL_EXPUNGE - ������� �������� ���� ��� ��������

imap_subscribe
����������� �� �������� ����.

��������� :
int imap_subscribe(int imap_stream, string mbox);

���������� true � ������ ������ � false �����.

imap_undelete
������� ������� � ��������� ����������� �� ��������.

��������� :
int imap_undelete(int imap_stream, int msg_number);

��� ������� c������ ������� � ��������� ����������� �� �������� �������� imap_delete().
���������� true � ������ ������ � false �����.

imap_unsubscribe
������� �������� � ��������� �����.

��������� :
int imap_unsubscribe(int imap_stream, string mbox);

���������� true � ������ ������ � false �����.

imap_qprint
������������ ������ ������� quoted-printable � 8-������� ������.

��������� :
string imap_qprint(string string);

���������� 8-������� (��������) ������.

imap_8bit
������������ 8-������� ������ � ������ quoted-printable.

��������� :
string imap_8bit(string string);

���������� ������ � ������� quoted-printable.

imap_binary
������������ 8-������ ������ � ������ base64.

��������� :
string imap_binary(string string);

���������� ������ � ������� base64.

imap_scanmailbox
������ ������ �������� ������, �������� ����� � ��������� ������.

��������� :
array imap_scanmailbox(int imap_stream, string string);

���������� ������, ���������� ����� �������� ������, ������� ����� ������ string � ��������.

imap_mailboxmsginfo
�������� ���������� � ������� �������� �����.

��������� :
array imap_mailboxmsginfo(int imap_stream);

���������� ���������� � ������� �������� �����. FALSE � ������ �������.
������� imap_mailboxmsginfo() ��������� ������ �������� ��������� ����� �� ������� � ���������� ���������� � ������� �� ���������� ����������:
Date : ���� ���������
Driver : �������
Mailbox : �������� ��������� �����
Nmsgs : ���������� ���������
Recent : ���������� ������� ��������� ���������
Unread : ���������� ������������� ���������
Size : ������ ��������� �����

imap_rfc822_write_address
���������� ��������� ����������������� email �����.

��������� :
string imap_rfc822_write_address(string mailbox, string host, string personal);

���������� ��������� ����������������� email ����� �� ������� ��������� �����, ����� � ������������ ����������.

imap_rfc822_parse_adrlist
�������� ������ �������� ������.

��������� :
string imap_rfc822_parse_adrlist(string address, string default_host);

��� ������� ��������� �������� ������ � ��� ������� ������ ���������� ������ ��������.
���� 4 ���� ��������:
mailbox - �������� ��������� ����� (��� ������������)
host - �������� �����
personal - ������ ���
adl - ���� � ������-���������

imap_setflag_full
������������� ����� �� ���������.

��������� :
string imap_setflag_full(int stream, string sequence, string flag, string options);

��� ������� ���������� �������� ��������� ���� � ������ ������ ��������� � ��������� ������������������.
options - ��� ������� ����� �� ST_UID
��������� ������������������ �������� UID� ������ �������

imap_clearflag_full
������� ����� ���������.

��������� :
string imap_clearflag_full(int stream, string sequence, string flag, string options);

��� ������� ���������� ������� ����� �� ������ ������ ��������� � ��������� ������������������.
options - ��� ������� ����� �� ST_UID
��������� ������������������ �������� UID� ������ �������

imap_sort
��������� ��������� � ������� �������� �����.

��������� :
string imap_sort(int stream, int criteria, int reverse, int options);

���������� ������ ������� ��������� ���������������� �� ������� ���������
Rev ������ ���� ����� 1 ���� ����� ���������� � �������� �������
�������� ���������� (������ ���� ������ ������ ����): SORTDATE - �� ���� ���������
SORTARRIVAL - �� ���� �����������
SORTFROM - �� ���� From
SORTSUBJECT - �� ���� ���������
SORTTO - �� ���� To
SORTCC - �� ���� cc
SORTSIZE - �� �������
����� - ������� ����� ��
SE_UID - ���������� UID� ������ ������� ������������������
SE_NOPREFETCH - �� ���������� ������� ��������� ���������

imap_fetchheader
���������� ��������� ���������.

��������� :
string imap_fetchheader(int imap_stream, int msgno, int flags);

��� ������� ���������� ������� ������, ����������������� ��������� ���������� ��������� � ������� RFC 822 ��� ��������� ������.
������:
FT_UID msgno �������� UID-��
FT_INTERNAL ������������ ������ �������� �� ���������� ������� ��� �����-���� ������� �������������� �� � ������� CRLF
FT_PREFETCHTEXT RFC822. ����� ������ ���� �������������� ��������. ��� ������� �������� ��������� �������� ���� ��������� ������� ������ ����� ��������� (��������, � �������� "��������� � ��������� �����")

imap_uid
��� ������� ���������� UID �� ������� ������ ��������� � ������������������.

��������� :
string imap_uid(string mailbox, int msgno);
�� ���������� ����� ����� ������� "PHP 4. ����������� ����������."
www.piter.com
������ / � ����������
 
Download
Ñêà÷àòü ñïðàâî÷íèê ïî PHP
��� ������:
05.07.2004
  • � ������� PHP ��������� ��������� ������� ��� ������ � ���������� (���������� GD):
    imagetypes(), ...
  • � ������� JavaScript ��������� �������� �� ����� D, E, F, H, I
  • � ������� ������ ��������� ������, �������������� ��� �������� � html-�������� ��������� MS Office (Word, Excel � �.�.)
  • �����������:
    ���� ��������� � ������� �����:
    ��������.
    ������������.
    ��� ����.
    ������ � �������.
    �������.
    ������ ���� �� ���������.
    ��������:
    Rambler's Top100
    Ñäåëàòü ñòðàíèöó ñòàðòîâîé ������� �������� ���������
    Äîáàâèòü ñòðàíèöó â èçáðàííîå �������� ���� � ���������
    Ñîîáùèòü îá íàéäåííîé îøèáêå �������� �� ������