: This article mainly introduces the use cases of api text message. For more information about PHP tutorials, see.
'Wxtest1', 'appid '=> 'wx5b79a26868798826', 'appsecret' => 'authorization', 'myweixinid' => 'GH _ 746ed5c6a58b '); $ zhwx-> setConfig ($ configArr); // configuration file if ($ zhwx-> validToken () {if ($ zhwx-> weixinBaseApiMessage ()) {$ keyword = $ zhwx-> getUserTextRequest (); // get the user's content $ msgtype = $ zhwx-> getUserMsgType (); // obtain the data type sent by the user $ SendTime = $ zhwx-> getUserSendTime (); // Obtain the time when the user sends the message if ($ msgtype = 'text' & $ keyword = 'news') {$ n EwsData = array ('title' => 'first news title', 'description' => 'first news introduction', 'picurl' => 'http: // t12.baidu.com/it/u%1040955509,77044968&fm%76', 'URL' => 'http: // wxphptest1.applinzi.com/news.php? Id = 1 '), array ('title' => 'second news title', 'description' => 'first news introduction ', 'picurl' => 'http: // scheme, 'URL' => 'http: // wxphptest1.applinzi.com//news.php? Id = 2'),); $ zhwx-> responseMessage ('news', $ newsData );}}}
The above describes the api text message cases, including the content, and hope to be helpful to friends who are interested in the PHP Tutorial.