當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Reply::transmitNews方法代碼示例

本文整理匯總了PHP中Reply::transmitNews方法的典型用法代碼示例。如果您正苦於以下問題:PHP Reply::transmitNews方法的具體用法?PHP Reply::transmitNews怎麽用?PHP Reply::transmitNews使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Reply的用法示例。


在下文中一共展示了Reply::transmitNews方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: responseMsg


//.........這裏部分代碼省略.........
                                                 $course_name = $resultArr[0]['course_name'];
                                                 // 課程名
                                                 $teaching_building = $resultArr[0]['teaching_building'];
                                                 // 教學樓
                                                 $teaching_number = $resultArr[0]['teaching_number'];
                                                 // 教室
                                                 $course_teacher = $resultArr[0]['course_teacher'];
                                                 // 老師
                                                 $startWeekly = $resultArr[0]['startWeekly'];
                                                 // 開始周
                                                 $endWeekly = $resultArr[0]['endWeekly'];
                                                 // 結束周
                                                 if (!empty($resultArr[1]['course_name'])) {
                                                     $course_name2 = $resultArr[1]['course_name'];
                                                     // 課程名
                                                     $teaching_building2 = $resultArr[1]['teaching_building'];
                                                     // 教學樓
                                                     $teaching_number2 = $resultArr[1]['teaching_number'];
                                                     // 教室
                                                     $course_teacher2 = $resultArr[1]['course_teacher'];
                                                     // 老師
                                                     $startWeekly2 = $resultArr[1]['startWeekly'];
                                                     // 開始周
                                                     $endWeekly2 = $resultArr[1]['endWeekly'];
                                                     // 結束周
                                                     $title2 = "\n--------\n" . $course_name2 . "\n📍" . $teaching_building2 . $teaching_number2 . "\n🕘" . $course_teacher2 . "({$startWeekly2}-{$endWeekly2} 周上)";
                                                 }
                                                 $title = "{$sectionTo1}-{$sectionTo2} 節:\n" . $course_name . "\n📍" . $teaching_building . $teaching_number . "\n🕘" . $course_teacher . "({$startWeekly}-{$endWeekly} 周上)" . $title2;
                                                 $content[] = array("Title" => "{$title}", "Description" => "", "PicUrl" => "", "Url" => "ifreeweixin.sinaapp.com/kcbView/kcbView.php?openid={$fromUsername}");
                                             }
                                             $title2 = "";
                                         }
                                         $content[] = array("Title" => "💬回複課表+數字可以查看任意星期的課表哦,如【課表,1】\n㊙點擊可以查看全周課表", "Description" => "", "PicUrl" => "", "Url" => "ifreeweixin.sinaapp.com/kcbView/kcbView.php?openid={$fromUsername}");
                                         echo $replyObj->transmitNews($object, $content);
                                         return;
                                     }
                                 }
                             }
                         } else {
                             if ($keyword == "朗讀") {
                                 $json_string = file_get_contents('http://apix.sinaapp.com/daily/?appkey=ifreeweixin&type=listening');
                                 // 讀取文件
                                 $obj = json_decode($json_string);
                                 $title = "每日英語朗讀";
                                 $description = "聽不懂,點擊【每日英語】查看";
                                 $musicUrl = $obj->MusicUrl;
                                 $content = array("Title" => "{$title}", "Description" => "{$description}", "MusicUrl" => "{$musicUrl}", "HQMusicUrl" => "{$musicUrl}");
                                 echo $replyObj->transmitMusic($object, $content);
                                 return;
                             } else {
                                 if (substr_count($keyword, '成績')) {
                                     /**
                                      * 判斷用戶是否已經認證
                                      */
                                     // $mmc_Openid = memcache_get ( $mmc, $fromUsername . "zjh" );
                                     if (empty($studentName)) {
                                         // 成績未認證轉到認證頁麵
                                         $scoreUrl = "http://218.196.240.171/weixinapi/index.php/Home/Jiaowu/loginview/openid/{$fromUsername}";
                                         // 體育未認證轉到認證頁麵
                                         $peUrl = "http://218.196.240.171/weixinapi/index.php/Home/Jiaowu/loginview/openid/{$fromUsername}";
                                     } else {
                                         // 已經認證轉到成績頁麵
                                         $scoreUrl = "http://ifreeweixin.sinaapp.com/scoreView/scoreResultView.php?openid={$fromUsername}";
                                         // 已經認證轉到體育達標頁麵
                                         $peUrl = "http://ifreeweixin.sinaapp.com/peQuery/peView.php?openid={$fromUsername}";
                                     }
開發者ID:mesfreeman,項目名稱:ifreeweixin,代碼行數:67,代碼來源:replyIndex.php


注:本文中的Reply::transmitNews方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。