dongniaocheng3773 2017-09-21 15:27
浏览 165

使用PHP通过Twilio Rest API发送批量短信

I am using Twilio PHP Library, and i want to send SMS messages to a big list of people using Twilio PHP REST API. I have a text file, that contains the list of unique phone numbers (approx 1000 members).

Currently my plan was to create a cron job, which parses the text file, and makes a REST API call for each of the phone numbers in the file.


require_once 'vendor/autoload.php';
use Twilio\Rest\Client;
$client = new Client($sid, $token);

$sms_sent = $client->messages->create(
        'from' => '+1xxxxxxxxxx',
        'body' => "XXXXXX XXXXXX",
        'statusCallback' => "http://myapplication_callback_url"

But i wanted to know, whether Twilio can do the job for me (like i will upload the text file to Twilio, and Twilio will process the file and send SMS to each number in it).

Is there any option like this with Twilio? I have read about the BULK SMS option here, but that seems like it sends out a static message to all the users. I need to send unique message to each user. How is this possible with Twilio? Please let me know.

EDIT: 27-09-2017: I have heard about Twilio COPILOT, but not sure how to use that service.

  • 写回答

3条回答 默认 最新


    相关推荐 更多相似问题


    • ¥16 请问pyglet如何做出不同按扭跳转不同页面的效果,以及如何储存选择选项的次数(语言-python)
    • ¥15 想了2小时了,求解答
    • ¥15 python怎么自动填表、登录?
    • ¥15 python列表嵌套按条件合并
    • ¥15 VBA怎么把工作簿A中的第N列,复制到工作簿B中的第N列。
    • ¥20 除了狗屎npm, 推荐一些编写web应用的方式?
    • ¥30 如何对嵌套结构体进行动态内存分配
    • ¥15 关于sprintf的几个问题
    • ¥15 不确定行列数的迷宫文件传入
    • ¥15 怎么解决kali linux从root文件夹里复制文件权限不够的问题