当前位置: 首页>>代码示例>>PHP>>正文


PHP wp_iso_descrambler函数代码示例

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


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

示例1: test_decodes_iso_8859_1_rfc2047_q_encoding

 function test_decodes_iso_8859_1_rfc2047_q_encoding()
 {
     $this->assertEquals("this is some text", wp_iso_descrambler("=?iso-8859-1?q?this=20is=20some=20text?="));
 }
开发者ID:boonebgorges,项目名称:develop.wordpress,代码行数:4,代码来源:isoDescrambler.php

示例2: explode

     $content_transfer_encoding = explode(';', $content_transfer_encoding);
     $content_transfer_encoding = $content_transfer_encoding[0];
 }
 if ($content_type == 'multipart/alternative' && false !== strpos($line, 'boundary="') && '' == $boundary) {
     $boundary = trim($line);
     $boundary = explode('"', $boundary);
     $boundary = $boundary[1];
 }
 if (preg_match('/Subject: /i', $line)) {
     $subject = trim($line);
     $subject = substr($subject, 9, strlen($subject) - 9);
     // Captures any text in the subject before $phone_delim as the subject
     if (function_exists('iconv_mime_decode')) {
         $subject = iconv_mime_decode($subject, 2, get_option('blog_charset'));
     } else {
         $subject = wp_iso_descrambler($subject);
     }
     $subject = explode($phone_delim, $subject);
     $subject = $subject[0];
 }
 /*
  * Set the author using the email address (From or Reply-To, the last used)
  * otherwise use the site admin.
  */
 if (!$author_found && preg_match('/^(From|Reply-To): /', $line)) {
     if (preg_match('|[a-z0-9_.-]+@[a-z0-9_.-]+(?!.*<)|i', $line, $matches)) {
         $author = $matches[0];
     } else {
         $author = trim($line);
     }
     $author = sanitize_email($author);
开发者ID:gigikiri,项目名称:WordPress,代码行数:31,代码来源:wp-mail.php

示例3: getlist

 function getlist($mail_server, $mail_port, $mail_user, $mail_pass, $max = 10)
 {
     $maillists = array();
     $phone_delim = '::';
     $pop3 = new POP3();
     if (!$pop3->connect($mail_server, $mail_port) || !$pop3->user($mail_user) || !($count = $pop3->pass($mail_pass))) {
         $pop3->quit();
         $this->error = 0 === $count ? 'There doesn&#8217;t seem to be any new mail.' : $pop3->ERROR;
         return false;
     }
     $this->count = $count;
     var_dump($count);
     //if($count > $max )$count = $max;
     for ($i = $count; $i > $count - 1; $i--) {
         $message = $pop3->get($i);
         /*foreach($message as $m=>$n){
               //$n=iconv_mime_decode($n, 2, "gbk");
               $n=base64_decode($n);
               $n=mb_convert_encoding($n, 'gbk', 'gbk');
               var_dump($n);
               if(strpos($n,'http://bbs.scol.com.cn/member.php')!==FALSE){
                  var_dump($n);
               }
               if(strpos($n,'(如果上面不')!==FALSE){
                  var_dump($n);
               }
             
               //$n=mb_convert_encoding($n, 'gbk', 'gbk');
           
               
           }*/
         /*for($j=0;$j<=sizeof($message);$j++){
               $message[$j]=base64_decode($message[$j]);
           }*/
         var_dump(base64_decode($message[42]));
         var_dump(substr(base64_decode($message[41]), 12));
         var_dump(substr(base64_decode($message[42]), 0, -12));
         $bf = substr(base64_decode($message[41]), 17);
         $af = trim(substr(base64_decode($message[42]), 0, -20));
         //$url=substr(base64_decode($message[43]),12)+substr(base64_decode($message[44]),0,-12);
         var_dump($bf . $af);
         $all = str_replace("\n", '', $bf . $af);
         $all = str_replace(">", "", $all);
         $all = str_replace("&amp;", "&", $all);
         //$snoopy->fetch($bf.$af);
         //$re =mb_convert_encoding($snoopy->results,"utf-8","gbk");
         //print_r($re);
         //sleep(10);
         //echo "。";
         //echo "<br/>";
         $bodysignal = false;
         $boundary = '';
         $charset = '';
         $content = '';
         $content_type = '';
         $content_transfer_encoding = '';
         $post_author = 1;
         foreach ((array) $message as $line) {
             //var_dump($line);
             // body signal
             if (strlen($line) < 3) {
                 $bodysignal = true;
             }
             if ($bodysignal) {
                 $content .= $line;
             } else {
                 if (preg_match('/Content-Type: /i', $line)) {
                     $content_type = trim($line);
                     $content_type = substr($content_type, 14, strlen($content_type) - 14);
                     $content_type = explode(';', $content_type);
                     if (!empty($content_type[1])) {
                         $charset = explode('=', $content_type[1]);
                         $charset = !empty($charset[1]) ? trim($charset[1]) : '';
                     }
                     $content_type = $content_type[0];
                 }
                 if (preg_match('/Content-Transfer-Encoding: /i', $line)) {
                     $content_transfer_encoding = trim($line);
                     $content_transfer_encoding = substr($content_transfer_encoding, 27, strlen($content_transfer_encoding) - 27);
                     $content_transfer_encoding = explode(';', $content_transfer_encoding);
                     $content_transfer_encoding = $content_transfer_encoding[0];
                 }
                 if ($content_type == 'multipart/alternative' && false !== strpos($line, 'boundary="') && '' == $boundary) {
                     $boundary = trim($line);
                     $boundary = explode('"', $boundary);
                     $boundary = $boundary[1];
                 }
                 if (preg_match('/Subject: /i', $line)) {
                     $subject = trim($line);
                     $subject = substr($subject, 9, strlen($subject) - 9);
                     // Captures any text in the subject before $phone_delim as the subject
                     if (function_exists('iconv_mime_decode')) {
                         $subject = iconv_mime_decode($subject, 2, "UTF-8");
                     } else {
                         $subject = wp_iso_descrambler($subject);
                     }
                     $subject = explode($phone_delim, $subject);
                     $subject = $subject[0];
                 }
                 // Set the author using the email address (From or Reply-To, the last used)
//.........这里部分代码省略.........
开发者ID:niubiuz,项目名称:snoopy,代码行数:101,代码来源:phppop3.php


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