用的是web接口,官方demo只有java的,这里整理的是php的。
$input = "yourInput";
$apikey = "yourKey";
$info = json_decode(file_get_contents('http://www.tuling123.com/openapi/api?key='.$apikey.'&info='.$input),true);
echo $info['text'];
即可。不涉及AES加密。
用的是web接口,官方demo只有java的,这里整理的是php的。
$input = "yourInput";
$apikey = "yourKey";
$info = json_decode(file_get_contents('http://www.tuling123.com/openapi/api?key='.$apikey.'&info='.$input),true);
echo $info['text'];