💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
1.图文回复 ~~~ public function response_text($fromUsername, $toUsername) { $textTpl = "<xml> <ToUserName><![CDATA[%s]]></ToUserName> <FromUserName><![CDATA[%s]]></FromUserName> <CreateTime>%s</CreateTime> <MsgType><![CDATA[%s]]></MsgType> <ArticleCount>%s</ArticleCount> %s </xml>"; $count=1; $str="<Articles> <item> <Title>< ![CDATA[壹城好店!] ]></Title> <Description>< ![CDATA[同城美食,家居,时尚,健身,教育.....咨询平台] ]></Description> <PicUrl>< ![CDATA[http://admin.nineopen.com:8000/uploads/banner/20180708/5bdd6e995e52d665c6486529c1bf8188.jpg] ]></PicUrl> <Url>< ![CDATA[http://www.nineopen.com] ]></Url> </item> </Articles>"; $msgType = "news"; $time =time(); $resultStr = sprintf($textTpl,$toUsername,$fromUsername, $time, $msgType,$count,$str); echo $resultStr; } ~~~