Big Change about Plugins

This commit is contained in:
Denny Dai
2015-06-30 15:05:22 +08:00
parent 3cc20a8a89
commit f94b5403f4
8 changed files with 38 additions and 32 deletions
+3 -5
View File
@@ -1,10 +1,8 @@
<?php
PluginList("tts", "Text To Speech");
if (preg_match("/^".preg_quote(TAG, '/')."tts (.*)$/", $text, $matches)) {
$mp3 = file_get_contents("http://tts.baidu.com/text2audio?lan=zh&ie=UTF-8&text=".urlencode($matches[1]));
PluginSet("tts", "Text To Speech");
$mp3 = file_get_contents("http://tts.baidu.com/text2audio?lan=zh&ie=UTF-8&text=".urlencode($plugin_text));
$file = fopen($from.".mp3","w");
echo fwrite($file,$mp3);
fclose($file);
$BOT->send_audio($from, "/home/wwwroot/1.vps.dennx.com/".$from.".mp3");
//unlink($matches[1].".mp3");
}
//unlink($matches[1].".mp3");