1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

PHP Script | SMS

Discussion in 'PHP' started by datropics, Apr 23, 2008.

  1. #1
    Does anyone know of a script that manages SMS messages via PHP utilising a SMS Gateway? If not, does anyone know of any product on the market?
     
    datropics, Apr 23, 2008 IP
  2. rhoula

    rhoula Well-Known Member

    Messages:
    875
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    145
    #2
    rhoula, Apr 28, 2008 IP
  3. sarahk

    sarahk iTamer Staff

    Messages:
    28,500
    Likes Received:
    4,460
    Best Answers:
    123
    Trophy Points:
    665
    #3
    clickatell is excellent.
     
    sarahk, Apr 29, 2008 IP
  4. adrevol

    adrevol Active Member

    Messages:
    124
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    58
    #4
    hello sarahk,

    incase of INDIA which is the best SMS Gateway, i m looking out for SMS gateway for one of my Non-Profitable Site
     
    adrevol, Apr 29, 2008 IP
  5. sarahk

    sarahk iTamer Staff

    Messages:
    28,500
    Likes Received:
    4,460
    Best Answers:
    123
    Trophy Points:
    665
    #5
    I can't imagine you'd have any problems with clickatell. It's not free, but it's professional and the costs are reasonable.
     
    sarahk, Apr 29, 2008 IP
  6. vishnups

    vishnups Banned

    Messages:
    166
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #6
    clickatell has closed down..and he is not asking about service providers but a php script to manage sms. I am currently developing it for www.realtytocell.com
     
    vishnups, Apr 29, 2008 IP
  7. sarahk

    sarahk iTamer Staff

    Messages:
    28,500
    Likes Received:
    4,460
    Best Answers:
    123
    Trophy Points:
    665
    #7
    You gave me a fright... but I logged into Clickatell just fine

    As for the script, once you've selected your gateway they normally come with plenty of sample scripts so I consider the two interchangeable.
     
    sarahk, Apr 29, 2008 IP
  8. vishnups

    vishnups Banned

    Messages:
    166
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #8
    @sarahk...The clickatell website has been down for nearly 1 month ... I am unable to log in...I am using this website link:
    http://www.clickatell.com
    can you please specify the url in which you are able to log in.. ?????

    Also, I am not talking about simple scripts but customized applications which requires custom programming..
     
    vishnups, Apr 29, 2008 IP
  9. sarahk

    sarahk iTamer Staff

    Messages:
    28,500
    Likes Received:
    4,460
    Best Answers:
    123
    Trophy Points:
    665
    #9
    Same link.

    I guess from the script point of view, I consider SMS capabilities to be an add on to an existing system. Therefore you just need samples and from there you build the component or whatever for your system. There is usually a larger requirement or "business problem" that needs to be solved and the SMS script needs to integrate and not stand alone.

    Your script may be great but will it work with SugarCRM, Silverstripe, LDAP or any other contact/user management system?
     
    sarahk, Apr 29, 2008 IP
  10. ABSOFT

    ABSOFT Well-Known Member

    Messages:
    204
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    103
    #10
    Hi guys,
    We are offering Free SMS Gateway services, you just buy credits and use http API to send SMS, paypal, credit cards are accepted.

    www.abtxt.com

    Free php, asp, asp.net code is available
     
    ABSOFT, Apr 30, 2008 IP
  11. sarahk

    sarahk iTamer Staff

    Messages:
    28,500
    Likes Received:
    4,460
    Best Answers:
    123
    Trophy Points:
    665
    #11
    Where does the "free" bit come in?

    Is it international?

    Do you need to know the network the number is on or does your gateway handle all that?
     
    sarahk, Apr 30, 2008 IP
  12. ABSOFT

    ABSOFT Well-Known Member

    Messages:
    204
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    103
    #12
    "Free" means to connect with my Gateway is free (I am giving API for that) just need to buy credits, as low as, you can buy 500 SMS credits for $8.75
    most of sms gateway are not giving free API.

    All countries, network numbers are handle by my gateway

    Welcome DP members, just signup and post your username here and I will give you 10 credits Free to test my gateway ;)

    if you buy more than 5000 credits, I will give you free sender id as well ;)
     
    ABSOFT, Apr 30, 2008 IP
  13. sarahk

    sarahk iTamer Staff

    Messages:
    28,500
    Likes Received:
    4,460
    Best Answers:
    123
    Trophy Points:
    665
    #13
    OK, your business model is a bit different from what I'm used to. I'm not used to having to pay to access the gateway although there are some companies in NZ that do that but they are normally associated with shortcodes and inbound SMS capture and response.
     
    sarahk, Apr 30, 2008 IP
  14. azlanhussain

    azlanhussain Active Member

    Messages:
    640
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    60
    #14
    I used to run my own SMS gateway with Telcos in Malaysia, Bangladesh, India, Indonesia and Nepal. But already sold off the whole business. All technical development were done by me.

    If you need to develop any SMS service either free or paid, I might be able to help. If you're interested, you can always PM me.

    Cheers,
     
    azlanhussain, May 29, 2008 IP
  15. nastynappy

    nastynappy Banned

    Messages:
    499
    Likes Received:
    16
    Best Answers:
    0
    Trophy Points:
    0
    #15
    What is an SMS gateway?? is it a kind of a device?
     
    nastynappy, May 30, 2008 IP
  16. azlanhussain

    azlanhussain Active Member

    Messages:
    640
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    60
    #16
    SMS gateway is a term that we use to identify our middle-ware that bridge between SMSC (Short Message Service Center located at mobile operator) and SMS application.

    Depending on Telcos, middle-ware can communicate with SMSC in various forms. In most cases our middle-ware is a Linux operated box with IP connectivity to SMSC and serial connection to a GSM modem for maintenance & monitoring.

    The middle-ware operates under Linux OS and runs our proprietary application and database.
     
    azlanhussain, May 31, 2008 IP
  17. nastynappy

    nastynappy Banned

    Messages:
    499
    Likes Received:
    16
    Best Answers:
    0
    Trophy Points:
    0
    #17
    huh ! no one here reads before replying.
    I just asked if its a device or a kind of software.
    I already know its working ( read it somewhere else )
     
    nastynappy, Jun 3, 2008 IP
  18. azlanhussain

    azlanhussain Active Member

    Messages:
    640
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    60
    #18
    "It is a combination of proprietary software and Linux box. "

    I have sold it in a form of device which I developed my self which comprise of the above mentioned.

    -and-

    I have also sold in a software form just by itself.

    Hope that helps.... :cool:


    cheers,


     
    azlanhussain, Jun 7, 2008 IP
  19. Ravanol

    Ravanol Peon

    Messages:
    1
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #19
    Here is another very simple and low cost SMS script at www . txtlocal.co.uk/sms-api.php

    The php code to send a message (using cURl or sockets.. very simple) is:

    <?php 
    $info = "1"; 
    $test = "0";
    $address = "www . txtlocal.com/sendsmspost.php";
    $message = "Hello this is a test with an ampersand (&) and a £5 note";
    $from = "Jims Autos";
    $uname = "youremailaddress";
    $pword = "yourpassword";
    $selectednums = "4412345545324";
    
    $newSMS = new sms;
    $newSMS->smsCurl($address, $uname, $pword, $message, $from, $selectednums, $info, $test); // Sends an SMS using cURL
    $newSMS->smsSockets($address, $uname, $pword, $message, $from, $selectednums, $info, $test); // Sends an SMS using sockets
    
    class sms {
        // cURL SMS
        function smsCurl($address, $uname, $pword, $message, $from, $selectednums, $info, $test=0)
        { 
            // Build url
            $data = "uname=" . $uname . "&pword=" . $pword . "&message=" . urlencode($message) . "&from=" . $from . "&selectednums=" . $selectednums . "&info=" . $info . "&test=" . $test; 
            // Initiate cURL
            $ch = curl_init();
            curl_setopt($ch, CURLOPT_URL, "xxx://$address"); 
            // curl_setopt($ch, CURLOPT_URL,"xxx://$address"); //secure connection
            curl_setopt($ch, CURLOPT_POST, 1);
            curl_setopt($ch, CURLOPT_POSTFIELDS, $data); 
            // curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); //use this to suppress output
            $result = curl_exec ($ch); //This is the result from Txtlocal - store as required
            curl_close ($ch);
        } 
        // Socket SMS
        function smsSockets($address, $uname, $pword, $message, $from, $selectednums, $info, $test = 0)
        { 
            // Build data array
            $data = array ("uname" => $uname, "pword" => $pword, "message" => $message, "from" => $from, "selectednums" => $selectednums, "info" => $info, "test" => $test);
            $data = http_build_query($data);
    
            do_post_request("https://www.txtlocal.com/sendsmspost.php", $data);
    
            $params = array('http' => array('method' => 'POST',
                    'content' => $data
                    ));
            if ($optional_headers !== null) {
                $params['http']['header'] = $optional_headers;
            } 
            $ctx = stream_context_create($params);
            $fp = @fopen($address, 'rb', false, $ctx);
            if (!$fp) {
                throw new Exception("Problem with $url, $php_errormsg");
            } 
            $response = @stream_get_contents($fp);
            if ($response === false) {
                throw new Exception("Problem reading data from $url, $php_errormsg");
            } 
            return $response;
        } 
    } 
    
    ?>
    Code (markup):
    You can also get a free SMS text receiver number and receive SMS text from any phone worldwide into php... at no cost at all! Simply add these 2 variables to your page and you will grab the messages: (see www . txtlocal.co.uk/freenumber.php for more info)

    $number = $_REQUEST["number"];
    $status = $_REQUEST["status"];
    Code (markup):
     
    Ravanol, Jun 11, 2008 IP
  20. clobberx

    clobberx Active Member

    Messages:
    73
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    61
    #20
    i am from telecom domain, i can do it for you, if u r still looking for me pm me the details
     
    clobberx, Jun 13, 2008 IP