Home > Backend Development > PHP Tutorial > google voice Google Voice SMS sending interface PHP open source version 20105 update

google voice Google Voice SMS sending interface PHP open source version 20105 update

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-07-29 08:43:23
Original
2050 people have browsed it

1. Support mass sending
2. Convert Chinese to Pinyin for sending
If you need to send multiple accounts in bulk, separate them with English commas (,) (86159..,86159..). The message content does not support Chinese. 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 "I am Xuan Feng" and the text message content is "Wo Shi Xuan Feng").

Copy the code The code is as follows:


/*
Tips: If you need to send multiple accounts in bulk, separate them with English commas (,) (86159..,86159..). The message content does not support Chinese.
The system will automatically Convert to Pinyin (in order to distinguish Pinyin, the first letter of Pinyin is capitalized),
Ensure that the message can be sent normally (input "I am Xuan Feng" text message content as "Wo Shi Xuan Feng")
Required PHP extension: curl. The character encoding is all GBK (taking Pinyin conversion into account)
*/
//Introducing files required for Pinyin conversion
include("libs/pinyin.php");
include "libs/googlevoice.class.php";
#Set up google voice Account password
$username="username@gmail.com";
$password="password";
//Accept numbers, separate multiple numbers with "," (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,
This function is purely for entertainment in my opinion and can be adjusted according to the actual situation Decide whether to add.
*/
//$message = zh2pinyin($message);
//Instantiation (required)
$sms = new GoogleVoice($username,$password);
//Return results
//Text sent to 86134...
echo $sms ->send($sendto,$message);
?>


Source code library package download/201007/yuanma/GoogleVoiceApi.rar

The above introduces the Google Voice Google Voice SMS sending interface PHP open source version 20105 update, including the content of Google Voice. I hope it will be helpful to friends who are interested in PHP tutorials.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template