php 用 imap_open 的認証
今天為了要一個利用Email帳號來認証使用者的認証程序,之前都利用fopen 的函數來做認証,今天想說用imap_open 來認証比較簡單,可是在設定上一直不能用,php manual 上的demo 是
{localhost:110/pop3}INBOX 或 {localhost:110/pop3} 可是都不行,而在網路上有人用 {localhost:110/pop3/notls} 竟然就可以了,後來查了一下才知道,原來 notls是不使用傳輸層級安全性(TLS) 驗證,可能是我的server沒有支援TLS,以後再研究,可以用 imap_open 認証,真的很方便,只要一行就可以認証
@$mbox = imap_open("{".$host.":110/pop3/notls}",$user,$passwd);
上面一行就可以了,其中 $host => mail server, $user => 使用者 , $passwd => 密碼,以前用 fopen 去開 110 port 要寫7,8行才可以
迴響
php 用 imap_open 的認証 | 豬窩 | 2
The other day, while I was at work, my sister
stole my apple ipad and tested to see if it can survive a forty
foot drop, just so she can be a youtube sensation. My apple ipad
is now broken and she has 83 views. I know this is totally off
topic but I had to share it with someone!
php 用 imap_open 的認証 | 豬窩 | 8
Attractive section of content. I just stumbled
upon your weblog and in accession capital to assert that I acquire actually enjoyed account your blog posts.
Anyway I'll be subscribing to your feeds and even I achievement you access consistently rapidly.
php 用 imap_open 的認証 | 豬窩 | 8
Hi! I've been reading your web site for some time now and finally got the courage to go ahead and give you
a shout out from Dallas Texas! Just wanted to mention keep up the
good work!
php 用 imap_open 的認証 | 豬窩 | 8
This design is incredible! You most certainly know how to keep a reader amused.
Between your wit and your videos, I was almost moved to start my own blog (well, almost...HaHa!) Wonderful job.
I really loved what you had to say, and more than that, how you presented it.
Too cool!
php 用 imap_open 的認証 | 豬窩 | 9
Fantastic goods from you, man. I've understand your stuff previous to and you are just extremely great.
I actually like what you have acquired here, really like what you're saying and the
way in which you say it. You make it enjoyable and you still care for to keep it smart.
I cant wait to read far more from you. This is actually a great site.