时间:2021-07-01 10:21:17 帮助过:6人阅读
//----------- 抓 取 回 复 ----------//
$url = "http://www.simsimi.com/func/req?lc=ch&msg=$keyword&ft=0.0";
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_REFERER, "http://www.simsimi.com/talk.htm?lc=ch");
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch, CURLOPT_COOKIE, $cookie);
$content = json_decode(curl_exec($ch),1);
curl_close($ch);
if($content['result']=='100') {
$content['response'];
return $content['response'];
} else {
return '我还不会回答这个问题...';
}
}
?>
http://www.bkjia.com/PHPjc/728117.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/728117.htmlTechArticle 代码如下:?php function simsimi($keyword) { $keyword = urlencode(urlencode($keyword)); //----------- 获取COOKIE ----------// $url = "http://www.simsimi.com/"; $c...