


WeChat public platform development (103) CET-4 and CET-6 score query, 103 score query_PHP tutorial
WeChat public platform development (103) CET-4 and CET-6 score query, 103 score query
National College English CET-4 and CET-6 exam results in June 2014 in August 2014 Published at 9:00 am on the 20th
We provide WeChat query method
1. Follow the WeChat public account
2. Reply to “Level 4 or 6”
3. Enter your name and admission ticket number
4. Return query results
Code implementation
<span> 1</span> <?<span>php </span><span> 2</span> <span>/*</span> <span> 3</span> <span> 方倍工作室 2014年6月全国大学英语四六级考试成绩查询 </span><span> 4</span> <span> CopyRight 2014 All Rights Reserved </span><span> 5</span> <span>*/</span> <span> 6</span> <span> 7</span> <span>define</span>("TOKEN", "weixin"<span>); </span><span> 8</span> <span> 9</span> <span>$wechatObj</span> = <span>new</span><span> wechatCallbackapiTest(); </span><span> 10</span> <span>if</span> (!<span>isset</span>(<span>$_GET</span>['echostr'<span>])) { </span><span> 11</span> <span>$wechatObj</span>-><span>responseMsg(); </span><span> 12</span> }<span>else</span><span>{ </span><span> 13</span> <span>$wechatObj</span>-><span>valid(); </span><span> 14</span> <span>} </span><span> 15</span> <span> 16</span> <span>class</span><span> wechatCallbackapiTest </span><span> 17</span> <span>{ </span><span> 18</span> <span>public</span> <span>function</span><span> valid() </span><span> 19</span> <span> { </span><span> 20</span> <span>$echoStr</span> = <span>$_GET</span>["echostr"<span>]; </span><span> 21</span> <span>$signature</span> = <span>$_GET</span>["signature"<span>]; </span><span> 22</span> <span>$timestamp</span> = <span>$_GET</span>["timestamp"<span>]; </span><span> 23</span> <span>$nonce</span> = <span>$_GET</span>["nonce"<span>]; </span><span> 24</span> <span>$token</span> =<span> TOKEN; </span><span> 25</span> <span>$tmpArr</span> = <span>array</span>(<span>$token</span>, <span>$timestamp</span>, <span>$nonce</span><span>); </span><span> 26</span> <span>sort</span>(<span>$tmpArr</span><span>); </span><span> 27</span> <span>$tmpStr</span> = <span>implode</span>(<span>$tmpArr</span><span>); </span><span> 28</span> <span>$tmpStr</span> = <span>sha1</span>(<span>$tmpStr</span><span>); </span><span> 29</span> <span>if</span>(<span>$tmpStr</span> == <span>$signature</span><span>){ </span><span> 30</span> <span>echo</span> <span>$echoStr</span><span>; </span><span> 31</span> <span>exit</span><span>; </span><span> 32</span> <span> } </span><span> 33</span> <span> } </span><span> 34</span> <span> 35</span> <span>public</span> <span>function</span><span> responseMsg() </span><span> 36</span> <span> { </span><span> 37</span> <span>$postStr</span> = <span>$GLOBALS</span>["HTTP_RAW_POST_DATA"<span>]; </span><span> 38</span> <span>if</span> (!<span>empty</span>(<span>$postStr</span><span>)){ </span><span> 39</span> <span>$this</span>->logger("R ".<span>$postStr</span><span>); </span><span> 40</span> <span>$postObj</span> = <span>simplexml_load_string</span>(<span>$postStr</span>, 'SimpleXMLElement',<span> LIBXML_NOCDATA); </span><span> 41</span> <span>$RX_TYPE</span> = <span>trim</span>(<span>$postObj</span>-><span>MsgType); </span><span> 42</span> <span> 43</span> <span>switch</span> (<span>$RX_TYPE</span><span>) </span><span> 44</span> <span> { </span><span> 45</span> <span>case</span> "event": <span> 46</span> <span>$result</span> = <span>$this</span>->receiveEvent(<span>$postObj</span><span>); </span><span> 47</span> <span>break</span><span>; </span><span> 48</span> <span>case</span> "text": <span> 49</span> <span>$result</span> = <span>$this</span>->receiveText(<span>$postObj</span><span>); </span><span> 50</span> <span>break</span><span>; </span><span> 51</span> <span> } </span><span> 52</span> <span>$this</span>->logger("T ".<span>$result</span><span>); </span><span> 53</span> <span>echo</span> <span>$result</span><span>; </span><span> 54</span> }<span>else</span><span> { </span><span> 55</span> <span>echo</span> ""<span>; </span><span> 56</span> <span>exit</span><span>; </span><span> 57</span> <span> } </span><span> 58</span> <span> } </span><span> 59</span> <span> 60</span> <span>private</span> <span>function</span> receiveEvent(<span>$object</span><span>) </span><span> 61</span> <span> { </span><span> 62</span> <span>$content</span> = ""<span>; </span><span> 63</span> <span>switch</span> (<span>$object</span>-><span>Event) </span><span> 64</span> <span> { </span><span> 65</span> <span>case</span> "subscribe": <span> 66</span> <span>$content</span> = <span>array</span><span>(); </span><span> 67</span> <span>$content</span>[] = <span>array</span>("Title" =>"2014年6月全国大学英语四六级考试成绩查询","Description" =>"", "PicUrl" =>"http://365jia.cn/uploads/13/0301/5130c2ff93618.jpg", "Url" =>"http://apix.sinaapp.com/cet/index.php?openid=".<span>$object</span>-><span>FromUserName); </span><span> 68</span> <span>break</span><span>; </span><span> 69</span> <span> } </span><span> 70</span> <span>if</span>(<span>is_array</span>(<span>$content</span><span>)){ </span><span> 71</span> <span>$result</span> = <span>$this</span>->transmitNews(<span>$object</span>, <span>$content</span><span>); </span><span> 72</span> }<span>else</span><span>{ </span><span> 73</span> <span>$result</span> = <span>$this</span>->transmitText(<span>$object</span>, <span>$content</span><span>); </span><span> 74</span> <span> } </span><span> 75</span> <span>return</span> <span>$result</span><span>; </span><span> 76</span> <span> } </span><span> 77</span> <span> 78</span> <span>private</span> <span>function</span> receiveText(<span>$object</span><span>) </span><span> 79</span> <span> { </span><span> 80</span> <span>$keyword</span> = <span>trim</span>(<span>$object</span>-><span>Content); </span><span> 81</span> <span>if</span> (<span>strstr</span>(<span>$keyword</span>, "四六级") || <span>strstr</span>(<span>$keyword</span>, "英语"<span>)){ </span><span> 82</span> <span>$content</span> = <span>array</span><span>(); </span><span> 83</span> <span>$content</span>[] = <span>array</span>("Title" =>"2014年6月全国大学英语四六级考试成绩查询","Description" =>"", "PicUrl" =>"http://365jia.cn/uploads/13/0301/5130c2ff93618.jpg", "Url" =>"http://apix.sinaapp.com/cet/index.php?openid=".<span>$object</span>-><span>FromUserName); </span><span> 84</span> }<span>else</span><span>{ </span><span> 85</span> <span>$content</span> = <span>date</span>("Y-m-d H:i:s",<span>time</span>())."\n技术支持 方倍工作室"<span>; </span><span> 86</span> <span> } </span><span> 87</span> <span>if</span>(<span>is_array</span>(<span>$content</span><span>)){ </span><span> 88</span> <span>$result</span> = <span>$this</span>->transmitNews(<span>$object</span>, <span>$content</span><span>); </span><span> 89</span> }<span>else</span><span>{ </span><span> 90</span> <span>$result</span> = <span>$this</span>->transmitText(<span>$object</span>, <span>$content</span><span>); </span><span> 91</span> <span> } </span><span> 92</span> <span>return</span> <span>$result</span><span>; </span><span> 93</span> <span> } </span><span> 94</span> <span> 95</span> <span>private</span> <span>function</span> transmitText(<span>$object</span>, <span>$content</span><span>) </span><span> 96</span> <span> { </span><span> 97</span> <span>$textTpl</span> = "<span><xml> </span><span> 98</span> <span><ToUserName><![CDATA[%s]]></ToUserName> </span><span> 99</span> <span><FromUserName><![CDATA[%s]]></FromUserName> </span><span>100</span> <span><CreateTime>%s</CreateTime> </span><span>101</span> <span><MsgType><![CDATA[text]]></MsgType> </span><span>102</span> <span><Content><![CDATA[%s]]></Content> </span><span>103</span> </xml>"<span>; </span><span>104</span> <span>$result</span> = <span>sprintf</span>(<span>$textTpl</span>, <span>$object</span>->FromUserName, <span>$object</span>->ToUserName, <span>time</span>(), <span>$content</span><span>); </span><span>105</span> <span>return</span> <span>$result</span><span>; </span><span>106</span> <span> } </span><span>107</span> <span>108</span> <span>private</span> <span>function</span> transmitNews(<span>$object</span>, <span>$arr_item</span><span>) </span><span>109</span> <span> { </span><span>110</span> <span>if</span>(!<span>is_array</span>(<span>$arr_item</span><span>)) </span><span>111</span> <span>return</span><span>; </span><span>112</span> <span>113</span> <span>$itemTpl</span> = "<span> <item> </span><span>114</span> <span> <Title><![CDATA[%s]]></Title> </span><span>115</span> <span> <Description><![CDATA[%s]]></Description> </span><span>116</span> <span> <PicUrl><![CDATA[%s]]></PicUrl> </span><span>117</span> <span> <Url><![CDATA[%s]]></Url> </span><span>118</span> <span> </item> </span><span>119</span> "<span>; </span><span>120</span> <span>$item_str</span> = ""<span>; </span><span>121</span> <span>foreach</span> (<span>$arr_item</span> <span>as</span> <span>$item</span><span>) </span><span>122</span> <span>$item_str</span> .= <span>sprintf</span>(<span>$itemTpl</span>, <span>$item</span>['Title'], <span>$item</span>['Description'], <span>$item</span>['PicUrl'], <span>$item</span>['Url'<span>]); </span><span>123</span> <span>124</span> <span>$newsTpl</span> = "<span><xml> </span><span>125</span> <span><ToUserName><![CDATA[%s]]></ToUserName> </span><span>126</span> <span><FromUserName><![CDATA[%s]]></FromUserName> </span><span>127</span> <span><CreateTime>%s</CreateTime> </span><span>128</span> <span><MsgType><![CDATA[news]]></MsgType> </span><span>129</span> <span><Content><![CDATA[]]></Content> </span><span>130</span> <span><ArticleCount>%s</ArticleCount> </span><span>131</span> <span><Articles> </span><span>132</span> <span>$item_str</span><span></Articles> </span><span>133</span> </xml>"<span>; </span><span>134</span> <span>135</span> <span>$result</span> = <span>sprintf</span>(<span>$newsTpl</span>, <span>$object</span>->FromUserName, <span>$object</span>->ToUserName, <span>time</span>(), <span>count</span>(<span>$arr_item</span><span>)); </span><span>136</span> <span>return</span> <span>$result</span><span>; </span><span>137</span> <span> } </span><span>138</span> <span>139</span> <span>private</span> <span>function</span> logger(<span>$log_content</span><span>) </span><span>140</span> <span> { </span><span>141</span> <span> } </span><span>142</span> <span>} </span><span>143</span> <span>144</span> <span>145</span> ?>
This book is available on JD.com or Dangdang. "WeChat Public Platform Application Development Practice" is written by Zhong Zhiyong, a senior software development engineer at Tencent and a pioneer in WeChat public platform application development. Its authoritativeness is unquestionable
A comprehensive introduction to WeChat public Various technologies required for platform application development, systematically interpreting the open API and various advanced functions of WeChat public platform, and gradually explaining the process, methods and techniques of WeChat public platform application development
Focusing on practical combat, not only presenting entertainment through 3 cases It not only provides a complete development process for type, application and game-type applications, but also implements a framework for rapid development of public platform applications, which can be used directly.
Are you a newly registered account? If it is a new account, it may not be displayed because it has not been approved yet. If it's not a new account, clear the browser cache, or try another machine. There should be no other reason.

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

1. WeChat is a social platform that pays attention to privacy protection. Users cannot see who has visited their Moments or personal homepage. 2. This design is intended to protect user privacy and avoid potential harassment or snooping. 3. Users can only see the likes and comments records in their circle of friends, further ensuring the confidentiality of personal information.

Thanks to netizens Qing Qiechensi, HH_KK, Satomi Ishihara and Wu Yanzu of South China for submitting clues! According to news on September 2, there are recent rumors that "iPhone 16 may not support WeChat." In response to this, a reporter from Shell Finance called Apple's official hotline. Apple's technical consultant in China responded that whether iOS systems or Apple devices can continue to use WeChat, and WeChat The issue of whether it can continue to be listed and downloaded on the Apple App Store requires communication and discussion between Apple and Tencent to determine the future situation. Software App Store and WeChat Problem Description Software App Store technical consultant pointed out that developers may need to pay fees to put software on the Apple Store. After reaching a certain number of downloads, Apple will need to pay corresponding fees for subsequent downloads. Apple is actively communicating with Tencent,

DeepSeek: A powerful AI image generation tool! DeepSeek itself is not an image generation tool, but its powerful core technology provides underlying support for many AI painting tools. Want to know how to use DeepSeek to generate images indirectly? Please continue reading! Generate images with DeepSeek-based AI tools: The following steps will guide you to use these tools: Launch the AI Painting Tool: Search and open a DeepSeek-based AI Painting Tool (for example, search "Simple AI"). Select the drawing mode: select "AI Drawing" or similar function, and select the image type according to your needs, such as "Anime Avatar", "Landscape"

1. To recover deleted WeChat chat history, you need to use two mobile phones for data migration. 2. On the old phone, click [Me] → [Settings] → [Chat] → [Chat History Migration and Backup]. 3. Select [Migrate] and set the target device platform. After selecting the chat history to be restored, click [Start]. 4. Then log in to the same account on the new phone and scan the QR code on the old phone to start the migration. 5. After the migration is completed, the deleted chat history will be restored to the new phone.

1. On the old device, click "Me" → "Settings" → "Chat" → "Chat History Migration and Backup" → "Migrate". 2. Select the target platform device to be migrated, select the chat records to be migrated, and click "Start". 3. Log in with the same WeChat account on the new device and scan the QR code to start chat record migration.

1. Open the WeChat app, click [Address Book] at the bottom of the interface, and click [New Friend]. 2. Enter the friend’s WeChat ID or nickname in the search box at the top of the page. 3. If the other party has not deleted the user, the user can find the friend in the search results. 4. Click on the friend to enter the chat window with him or her, and you can view the previous chat history.

Rumors of WeChat supporting iPhone 16 were debunked. Thanks to netizens Xi Chuang Jiu Shi and HH_KK for submitting clues! According to news on September 2, there are rumors today that WeChat may not support iPhone 16. Once the iPhone is upgraded to the iOS 18.2 system, it will not be able to use WeChat. According to "Daily Economic News", it was learned from people familiar with the matter that this rumor is a rumor. Apple's response: According to Shell Finance, Apple's technical consultant in China responded that the issue of whether WeChat can continue to be used on iOS systems or Apple devices, and whether WeChat can continue to be listed and downloaded in the Apple App Store, needs to be resolved between Apple and Tencent. Only through communication and discussion can we determine the future situation. Currently, Apple is actively communicating with Tencent to confirm whether Tencent will continue to

1. Open the WeChat mini program and enter the corresponding mini program page. 2. Find the member-related entrance on the mini program page. Usually the member entrance is in the bottom navigation bar or personal center. 3. Click the membership portal to enter the membership application page. 4. On the membership application page, fill in relevant information, such as mobile phone number, name, etc. After completing the information, submit the application. 5. The mini program will review the membership application. After passing the review, the user can become a member of the WeChat mini program. 6. As a member, users will enjoy more membership rights, such as points, coupons, member-exclusive activities, etc.
