? Sina App Engine (hereinafter referred to as SAE) The Sina Research and Development Center was developed in August 2009 and officially launched its first alpha version of the country's first public cloud computing platform on November 3, 2009, and SAE is a core part of Sina's cloud computing strategy.
We first apply for an account: Direct access to http://sae.sina.com.cn
after the registration is successful, we can enter the management system.Select Create SAEChoose PHP Here, you can also use other languages oh
after the successful creation, we can see two version control system Oh, because I am more familiar with SVN, so I downloaded the tortoisesvnDownload the official website and the online disk:
Official website:http://tortoisesvn.net/downloads.html
NET disk:http://www.kuaipan.cn/file/id_8825968814858609.html
Note To create a version number Ohthen choose Upload Code Package, provide interface code
<?php/** * WeChat PHP test *///define your Tokendefine ("TOKEN", "Weixin"); $wechatObj = new Wechatcallbackapitest (); $w Echatobj->valid (); class Wechatcallbackapitest{public function valid () {$echoStr = $_get["Echostr"]; Valid signature, option if ($this->checksignature ()) {echo $echoStr; Exit }} Public Function responsemsg () {//get post data, could be due to the different environments$poststr = $GLOBALS [" Http_raw_post_data "]; Extract Post Dataif (!empty ($POSTSTR)) {$POSTOBJ = simplexml_load_string ($postStr, ' SimpleX Mlelement ', libxml_nocdata); $fromUsername = $POSTOBJ->fromusername; $toUsername = $POSTOBJ->tousername; $keyword = Trim ($postObj->content); $time = time (); $TEXTTPL = "<xml><tousername><! [cdata[%s]]></tousername><fromusername><! [Cdata[%s]]></fromusername><createtime>%s</createtime><msgtype><! [cdata[%s]]></msgtype><content><! [cdata[%s]]></content><funcflag>0</funcflag></xml> "; if (!empty ($keyword)) {$msgType = "text"; $CONTENTSTR = "Welcome to WeChat world!"; $RESULTSTR = sprintf ($TEXTTPL, $fromUsername, $toUsername, $time, $msgType, $CONTENTSTR); Echo $resultStr; }else{echo "Input something ..."; }}else {echo ""; Exit }}private function Checksignature () {$signature = $_get["signature"]; $timestamp = $_get["timestamp"]; $nonce = $_get["nonce"]; $token = token, $TMPARR = Array ($token, $timestamp, $nonce), sort ($TMPARR), $tmpStr = implode ($TMPARR); $tmpStr = SHA1 ($tmp STR); if ($tmpStr = = $signature) {return true;} Else{return false;}}? >
Note To use professional software, set the encoding for UTF-8, while compressing the file to zip, you can upload Oh, do not use Notepad Oh upload success, click Edit Code, you can see our code OH
Open that link: You can see the Web page we're building.
Create a Sina cloud computing platform Application