當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。