Skip to content

Commit

Permalink
Update wechat.class.php
Browse files Browse the repository at this point in the history
  • Loading branch information
shengdaojin authored Nov 24, 2016
1 parent 9be641c commit cc3e02b
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions wechat.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,10 @@ private function _doText($postObj){
$contentStr='高大上的IT培训机构!';
break;
default:
$curl = 'http://www.sobot.com/chat/robot/chat.action';
$data =
'requestText='.$postObj->Content.'&sysNum=4c349791a07b46c1a70b8ac88aa23257&uid=ea24c9b3b0664225af4d21ba94ddbaa0&cid=5347dd7f65b24515b93700ded838d5df';
$content = $this->_request($curl, false, 'POST', $data);
// file_put_contents('./tmp',$content);
$curl = 'http://api.qingyunke.com/api.php?key=free&appid=0&msg='.$postObj->Content;
$content = $this->_request($curl, false, 'GET', null);
$content = json_decode($content);
$contentStr = $content->answer;
$contentStr = $content->content;
}
$resultStr = sprintf($textTpl, $fromUsername, $toUsername, $time, $msgType, $contentStr);
echo $resultStr;
Expand Down Expand Up @@ -154,4 +151,4 @@ public function _getQRCode($sceneid, $type = 'temp', $expire_seconds = 604800){/
return $content;
}
}
?>
?>

0 comments on commit cc3e02b

Please sign in to comment.