1. Support group sending
2. Convert Chinese to pinyin and send
If you need to send multiple accounts in group, separate them with English commas (,) (86159..,86159..). The message content does not support Chinese. When you enter Chinese At this time, the system will automatically convert to Pinyin (in order to distinguish Pinyin, the first letter of Pinyin is capitalized) to ensure that the message can be sent normally (enter the text message "I am Xuan Feng" as "Wo Shi Xuan Feng").
Copy code The code is as follows:
/*
Tip: If you need to send multiple accounts in bulk, separate them with commas (,) (86159..,86159..), the message content does not support Chinese.
When you enter Chinese, the system will automatically convert it to Pinyin (in order to distinguish Pinyin, the first letter of Pinyin is capitalized),
Ensure that the message can be normal Send (enter "I am Xuan Feng" and the text message content is "Wo Shi Xuan Feng")
Required PHP extension: curl. The character encoding is all GBK (taking Pinyin conversion into consideration)
*/
//Introducing the files required for Pinyin conversion
include("libs/pinyin.php");
include "libs/googlevoice.class. php";
#Set google voice account password
$username="username@gmail.com";
$password="password";
//Accept numbers, use "," for multiple numbers Separate (86159..,86159..)
$sendto ="8615900000000,8613400000000";
//Message content
$message = "I am from heqee.com";
/*
Convert Chinese to Pinyin and the program automatically recognizes Chinese and replaces it.
I personally think this function is purely for entertainment. You can decide whether to add it according to the actual situation.
*/
//$message = zh2pinyin($message) ;
//Instantiation (required)
$sms = new GoogleVoice($username,$password);
//Return result
//Text sent to 86134...
echo $sms ->send($sendto,$message);
?>
Source code library package download/201007/yuanma/GoogleVoiceApi.rar
http://www.bkjia.com/PHPjc/322217.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/322217.htmlTechArticle1, supports mass sending 2, Chinese is converted into pinyin and sent. If you need to send multiple accounts in bulk, separate them with English commas (,) ( 86159..,86159..), the message content does not support Chinese. When you enter Chinese, the system will...