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


PHP Reply::transmitMusic方法代码示例

本文整理汇总了PHP中Reply::transmitMusic方法的典型用法代码示例。如果您正苦于以下问题:PHP Reply::transmitMusic方法的具体用法?PHP Reply::transmitMusic怎么用?PHP Reply::transmitMusic使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Reply的用法示例。


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

示例1: responseMsg


//.........这里部分代码省略.........
                                                     // 课程名
                                                     $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}";
                                     }
                                     $content = array();
                                     $content[] = array("Title" => "💯期末成绩", "Description" => "", "PicUrl" => "https://mmbiz.qlogo.cn/mmbiz/EKniaJHUPHicRgibybsdwUO172PBkQtZzlyfiajHev0mE4QXic2vbOEJgcDIc1TJthkprMzZk3hqZPjppWibgNz7Zd1w/0", "Url" => $scoreUrl);
                                     $content[] = array("Title" => "💯四六级成绩", "Description" => "", "PicUrl" => "https://mmbiz.qlogo.cn/mmbiz/EKniaJHUPHicRgibybsdwUO172PBkQtZzlyChU8rZ7t9TjgXymc2hicWkCdDW16ZtV7M9PiahpA9RYP5dxQ6QAfvwNQ/0", "Url" => "http://ifreeweixin.sinaapp.com/cet46/cet46View.php?openid={$fromUsername}");
                                     $content[] = array("Title" => "💯体育达标测试", "Description" => "", "PicUrl" => "https://mmbiz.qlogo.cn/mmbiz/EKniaJHUPHicRgibybsdwUO172PBkQtZzlyEuZqXftqDwDzWtnicTNGkYWFHwyewTVE9tJygxaE4RtDMq9lk2jH0xA/0", "Url" => $peUrl);
                                     $content[] = array("Title" => "💯普通话水平测试", "Description" => "", "PicUrl" => "https://mmbiz.qlogo.cn/mmbiz/EKniaJHUPHicRgibybsdwUO172PBkQtZzlysmt4Xicn26zEUjIpVKV32roUcDJvjvLjq7m11vTEA88QjCyLAwYan5w/0", "Url" => "");
                                     $content[] = array("Title" => "💯全国计算机等级考试", "Description" => "", "PicUrl" => "https://mmbiz.qlogo.cn/mmbiz/EKniaJHUPHicRgibybsdwUO172PBkQtZzlyz59ib3tXt3d8WfpLjNUJ8wAASaqcr9T8sMaDsctEYQVIjVYS9arhSicA/0", "Url" => "");
                                     echo $replyObj->transmitNews($object, $content);
                                     return;
                                 } else {
                                     if (preg_match("/重绑密码,[A-Za-z0-9]+/", $keyword)) {
                                         $keywordArr = explode(",", $keyword);
                                         $userPassword = $keywordArr[1];
                                         $sql_state = "update tb_studentinfo set password = '{$userPassword}'where openid='{$fromUsername}'";
                                         if ($class_mysqlObj->query($sql_state) && memcache_set($mmc, $fromUsername . "password", $userPassword)) {
开发者ID:mesfreeman,项目名称:ifreeweixin,代码行数:67,代码来源:replyIndex.php


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