The background of the public platform can complete general operations to achieve self-media, magazine, reading, and corporate WeChat. However, these are far from the potential to open the public platform, after you become a developer, you can feel the strength of the public platform. However, the first step of applying to become a developer is a hurdle. here is the tutorial for applying to become a developer, which helps readers clear the obstacles.
Go to advanced features-development mode. the developer button is displayed below. click this button. if you have set a profile picture or something, go to the following page:
Here, the token can be defined at will. if the entered url fails, the system will prompt that the url times out or your server does not correctly respond to Token verification. please refer to the message interface user guide, below you want to have your host, write a php file, the content is as follows, write the url address of this php file to OK:
- Define ("TOKEN", "dismath ");
- $ WechatObj = new wechatCallbackapiTest ();
- $ WechatObj-> valid ();
-
- Class wechatCallbackapiTest
- {
- Public function valid ()
- {
- $ EchoStr = $ _ GET ["echostr"]; // random string
- If ($ this-> checkSignature ()){
- Echo $ echoStr;
- 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 ($ tmpStr );
-
- If ($ tmpStr = $ signature ){
- Return true;
- } Else {
- Return false;
- }
- }
- }