php sms script

Discussion in 'PHP' started by jagjeetsingh, Jan 23, 2010.

  1. #1
    hello friends
    i want to send sms through web.i have sms gateway info which is required to send sms through a web page.but i need a script to implement all these things.i have one script but its not working for me.please help me.any one can give me script like that or can debug mine script.
    thanks in advance.
     
    jagjeetsingh, Jan 23, 2010 IP
  2. astkboy2008

    astkboy2008 Peon

    Messages:
    211
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #2
    i get a class work with www.tm4b.com
    the example
    <?php
    
    // Include the class
    require 'class.swd_SMS.php';
    
    // Create the object. (Parameters are optional if they're set in the class already)
    $SMS = new swd_SMS('username', 'password');
    
    // Send SMS. First parameter is the cell phone number with country code. (Without leading 00)
    $SMS->send('34123456789', 'The message goes here');
    
    // Let's send another just for fun
    $SMS->send('34987654321', 'The message goes here');
    
    // All sent messages are stored in an array.
    echo '<pre>' . print_r($SMS->sent_messages, true) . '</pre>';
    
    
    // Each sent message has a unique message ID, which is in the array above as well. With this we can
    see the message status any time. Like this:
    
    $status = $SMS->fetch_msg_status('MT0052355965-1');
    
    echo '<pre>' . print_r($status, true) . '</pre>';
    
    
    ?>
    PHP:
    the class
    class.swd_SMS.php [15.53 KB]
     
    Last edited: Jan 23, 2010
    astkboy2008, Jan 23, 2010 IP
  3. mastermunj

    mastermunj Well-Known Member

    Messages:
    687
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    110
    #3
    Hi,

    Yours is HTTP gateway or SMPP?

    I can sort out your problems if you can share more details. Need be, you can PM me.
     
    mastermunj, Jan 23, 2010 IP
  4. jagjeetsingh

    jagjeetsingh Peon

    Messages:
    104
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    its HTTP gateway.
     
    jagjeetsingh, Jan 23, 2010 IP