您好,欢迎访问一九零五行业门户网

微信公众平台开发(103) 四六级成绩查询,103成绩查询_PHP教程

微信公众平台开发(103) 四六级成绩查询,103成绩查询2014年6月全国大学英语四、六级考试考试成绩于2014年8月20日上午9时发布
我们提供微信查询方法
1、关注微信公众账号
二、回复“四六级”
三、输入姓名和准考证号
四、返回查询结果
代码实现
1 responsemsg(); 12 }else{ 13 $wechatobj->valid(); 14 } 15 16 class wechatcallbackapitest 17 { 18 public function valid() 19 { 20 $echostr = $_get[echostr]; 21 $signature = $_get[signature]; 22 $timestamp = $_get[timestamp]; 23 $nonce = $_get[nonce]; 24 $token = token; 25 $tmparr = array($token, $timestamp, $nonce); 26 sort($tmparr); 27 $tmpstr = implode($tmparr); 28 $tmpstr = sha1($tmpstr); 29 if($tmpstr == $signature){ 30 echo $echostr; 31 exit; 32 } 33 } 34 35 public function responsemsg() 36 { 37 $poststr = $globals[http_raw_post_data]; 38 if (!empty($poststr)){ 39 $this->logger(r .$poststr); 40 $postobj = simplexml_load_string($poststr, 'simplexmlelement', libxml_nocdata); 41 $rx_type = trim($postobj->msgtype); 42 43 switch ($rx_type) 44 { 45 case event: 46 $result = $this->receiveevent($postobj); 47 break; 48 case text: 49 $result = $this->receivetext($postobj); 50 break; 51 } 52 $this->logger(t .$result); 53 echo $result; 54 }else { 55 echo ; 56 exit; 57 } 58 } 59 60 private function receiveevent($object) 61 { 62 $content = ; 63 switch ($object->event) 64 { 65 case subscribe: 66 $content = array(); 67 $content[] = array(title =>2014年6月全国大学英语四六级考试成绩查询,description =>, picurl =>http://365jia.cn/uploads/13/0301/5130c2ff93618.jpg, url =>http://apix.sinaapp.com/cet/index.php?openid=.$object->fromusername); 68 break; 69 } 70 if(is_array($content)){ 71 $result = $this->transmitnews($object, $content); 72 }else{ 73 $result = $this->transmittext($object, $content); 74 } 75 return $result; 76 } 77 78 private function receivetext($object) 79 { 80 $keyword = trim($object->content); 81 if (strstr($keyword, 四六级) || strstr($keyword, 英语)){ 82 $content = array(); 83 $content[] = array(title =>2014年6月全国大学英语四六级考试成绩查询,description =>, picurl =>http://365jia.cn/uploads/13/0301/5130c2ff93618.jpg, url =>http://apix.sinaapp.com/cet/index.php?openid=.$object->fromusername); 84 }else{ 85 $content = date(y-m-d h:i:s,time()).\n技术支持 方倍工作室; 86 } 87 if(is_array($content)){ 88 $result = $this->transmitnews($object, $content); 89 }else{ 90 $result = $this->transmittext($object, $content); 91 } 92 return $result; 93 } 94 95 private function transmittext($object, $content) 96 { 97 $texttpl = 98 99 100 %s101 102 103 ;104 $result = sprintf($texttpl, $object->fromusername, $object->tousername, time(), $content);105 return $result;106 }107 108 private function transmitnews($object, $arr_item)109 {110 if(!is_array($arr_item))111 return;112 113 $itemtpl = 114 115 116 117 118 119 ;120 $item_str = ;121 foreach ($arr_item as $item)122 $item_str .= sprintf($itemtpl, $item['title'], $item['description'], $item['picurl'], $item['url']);123 124 $newstpl = 125 126 127 %s128 129 130 %s131 132 $item_str133 ;134 135 $result = sprintf($newstpl, $object->fromusername, $object->tousername, time(), count($arr_item));136 return $result;137 }138 139 private function logger($log_content)140 {141 }142 }143 144 145 ?>
微信公众平台开发实例
京东或当当都有这本书卖《微信公众平台应用开发实战》作者钟志勇,腾讯公司资深软件研发工程师兼微信公众平台应用开发先驱者撰写,权威性毋庸置疑
全面介绍微信公众平台应用开发所需各项技术,系统解读微信公众平台开放的api和各项高级功能,逐步讲解微信公众平台应用开发的流程、方法和技巧
注重实战,不仅通过3个案例呈现了娱乐型、应用型、游戏型应用的完整开发过程,而且还实现了一个快速开发公众平台应用的框架,可以直接使用。
微信公众平台的高级功可以点进去页面显示不存在?
你是新注册的账号吗?要是新账号,不显示应该是因为还没被审核通过吧。要不是新账号,就清理下浏览器缓存,要么就换台机器试试。应该不会有别的原因了。
http://www.bkjia.com/phpjc/866464.htmlwww.bkjia.comtruehttp://www.bkjia.com/phpjc/866464.htmltecharticle微信公众平台开发(103) 四六级成绩查询,103成绩查询 2014年6月全国大学英语四、六级考试考试成绩于2014年8月20日上午9时发布 我们提供微信...
其它类似信息

推荐信息