SitePoint Sponsor

User Tag List

Results 1 to 9 of 9
  1. #1
    SitePoint Addict goldensona's Avatar
    Join Date
    Jun 2011
    Posts
    226
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    How to send verification sms using php ?

    Hi

    how to send sms verification using php,which api is best for it.please suggestion solution to it

  2. #2
    SitePoint Guru r2d2's Avatar
    Join Date
    Dec 2003
    Location
    In my van, fool!
    Posts
    646
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'd suggest you look at Twilio.

  3. #3
    SitePoint Addict goldensona's Avatar
    Join Date
    Jun 2011
    Posts
    226
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    can you give any other examples ?

  4. #4
    SitePoint Evangelist
    Join Date
    Jan 2002
    Location
    Scotland, UK
    Posts
    530
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Bulk SMS Marketing, Mobile Marketing, SMS Gateway, Email to Text, - Txtlocal

    PHP Code:
    // Authorisation details.
    $uname "xxx@xxxx.com";
    $hash "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";

    // Configuration variables. Consult http://www.txtlocal.co.uk/developers/ for more info.
    $info "1";
    $test "0";

    // Data for text message. This is the text message data.
    $from "Bla"// This is who the message appears to be from.
    $to "44797111111"//A single number or a comma-seperated list of numbers
    $message "Message"//612 chars or less

    // You shouldn't need to change anything here.
    $message urlencode($message);
    $data "uname=".$uname."&hash=".$hash."&message=".$message."&from=".$from."&selectednums=".$to."&info=".$info."&test=".$test;
    $ch curl_init('http://www.txtlocal.com/sendsmspost.php');
    curl_setopt($chCURLOPT_POSTtrue);
    curl_setopt($chCURLOPT_POSTFIELDS$data);
    curl_setopt($chCURLOPT_RETURNTRANSFERtrue);
    $result curl_exec($ch); //This is the result from the API
    curl_close($ch); 

  5. #5
    SitePoint Addict goldensona's Avatar
    Join Date
    Jun 2011
    Posts
    226
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Thank you rikki. is this free of cost ?

  6. #6
    SitePoint Evangelist
    Join Date
    Jan 2002
    Location
    Scotland, UK
    Posts
    530
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Fraid not but is it cheap

  7. #7
    Keeper of the SFL StarLion's Avatar
    Join Date
    Feb 2006
    Location
    Atlanta, GA, USA
    Posts
    3,748
    Mentioned
    73 Post(s)
    Tagged
    0 Thread(s)
    Free is going to be difficult to find/use-reliably. Why? Because if it were free and easy, you'd receive 200 spam sms messages a day on your cellphone instead of emails in your inbox.

  8. #8
    SitePoint Addict goldensona's Avatar
    Join Date
    Jun 2011
    Posts
    226
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    okay thanks to all who give support to find solution

  9. #9
    SitePoint Member
    Join Date
    Aug 2011
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by StarLion View Post
    Free is going to be difficult to find/use-reliably. Why? Because if it were free and easy, you'd receive 200 spam sms messages a day on your cellphone instead of emails in your inbox.
    Totally agree Unfortunately there are no reliable free sms service provides so you have to pay for the sms service. Most SMS gateways provide external API which can be used to do that. You can check SMS notification | PHP SMS API to send SMS through a web application which seems to work a lot easy. Their integration code is pretty simple:

    <?php
    $SMSLIB["phone"] = '44111222333'; // your phone number
    $SMSLIB["key"] = 'abcdefghijklmnopqrs'; // your personal API code
    include("smslib.php"); // we will provide you with smslib.php file
    sendSMS("test message", $SMSLIB["phone"]); // function which sends the message
    ?>

    and you will need authentication key. The best thing is that if you want you can add IP or country based filters so you can block specific IP addresses or countries.


Bookmarks

Posting Permissions

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