本文整理匯總了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)) {