fix plugins ["trans","tts"]

This commit is contained in:
Denny Dai
2015-06-04 17:25:51 +08:00
parent 3d4035aecc
commit 72a36e5164
2 changed files with 11 additions and 7 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
<?php
PluginList("tts", "Text To Speech");
if (preg_match("/^".TAG."tts (.*)$/", $_GET['text'], $matches)) {
$mp3 = file_get_contents("http://tts.baidu.com/text2audio?lan=zh&ie=UTF-8&text=".$matches[1]);
$mp3 = file_get_contents("http://tts.baidu.com/text2audio?lan=zh&ie=UTF-8&text=".urlencode($matches[1]));
$file = fopen($_GET['from'].".mp3","w");
echo fwrite($file,$mp3);
fclose($file);