How to send bulk SMS with PHP?
Results 1 to 5 of 5

Thread: How to send bulk SMS with PHP?

  1. #1
    Junior Member
    Join Date
    Mar 2017
    Location
    India
    Posts
    8

    How to send bulk SMS with PHP?

    I wanted to send bulk SMS directly from my platform built in PHP. Should I take PHP SMS API services from bulk SMS providers or any other way available for my PHP Platform?

  2. #2
    Settled 4 red convertible dalecosp's Avatar
    Join Date
    Jul 2002
    Location
    Accelerating Windows at 9.81 m/s....
    Posts
    8,520
    If your recipients have service with a carrier that has an SMTP-to-SMS gateway, it's easily doable with mail(). The problem being, you can't tell a carrier from the number (at least, not in the USA), so you have to someone get that data from the user.

    Otherwise, a 3rd-party service might be your only option ... at least, the only one I can think of.
    /!!\ mysql_ is deprecated --- don't use it! Tell your hosting company you will switch if they don't upgrade! /!!!\ ereg() is deprecated --- don't use it!

    dalecosp "God doesn't play dice." --- Einstein "Perl is hardly a paragon of beautiful syntax." --- Weedpacket

    Getting Help at All --- Collected Solutions to Common Problems --- Debugging 101 --- Unanswered Posts --- OMBE: Office Machines, Business Equipment

  3. #3
    Pedantic Curmudgeon Weedpacket's Avatar
    Join Date
    Aug 2002
    Location
    General Contact Unit "Coping Mechanism"
    Posts
    22,531
    If you want to use a phone service then communication with a phone service provider will have to be involved at some point, unless you want to get into the business yourself.
    THERE IS AS YET INSUFFICIENT DATA FOR A MEANINGFUL ANSWER
    FAQs! FAQs! FAQs! Most forums have them!
    Search - Debugging 101 - Collected Solutions - General Guidelines - Getting help at all

  4. #4
    Junior Member
    Join Date
    Jul 2017
    Posts
    3
    I'd suggest that you get a Twilio account and send via them. I have done this via PHP and sent 10K plus sms messages (all in the US) over the past year and it works like a champ. They have PHP sample code on their website.

  5. #5
    Junior Member
    Join Date
    Jun 2017
    Location
    USA
    Posts
    1
    You can do it with Twilo. I've already used and send more than 3k messages till now. I can mention the code here :

    <?php
    // Get the PHP helper library from twilio.com/docs/php/install
    require_once 'vendor/autoload.php'; // Loads the library
    use Twilio\Rest\Client;

    // Download the PHP helper library from twilio.com/docs/php/install
    // These vars are your accountSid and authToken from twilio.com/user/account
    $account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
    $auth_token = 'your_auth_token';
    $client = new Client($account_sid, $auth_token);

    $client->messages->create(
    "+441632960675",
    array(
    'messagingServiceSid' => "MGXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    'body' => "Phantom Menace was clearly the best of the prequel trilogy."
    )
    );
    Hope it helps

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •