Zend - The PHP Company




Utilities

Add Code


Send a 1-Way SMS Wireless Message with PHP  

Type: code fragment
Added by: Bobwhite
Entered: 11/10/2001
Last modified: 31/10/2000
Rating: - (fewer than 3 votes)
Views: 7784
Allows you to embed SMS wireless messaging to cell phones and pagers from PHP applications of all types. Uses the Simplewire network to reach mobile users in 118 countries. The best way is to join the Simplewire Developer Program at http://devprogram.simplewire.com. Then download the SDK as listed. Then you will receive an email explaining what to do.


?>

<?
    $sms 
= new COM("Simplewire.SMS");

    
// Subscriber Settings
    
$sms->SubscriberID "123-456-789-12345";
    
$sms->SubscriberPassword "Password Goes Here";

    
// Message Settings
    
$sms->MsgPin "+1 100 510 1234";
    
$sms->MsgFrom "Demo";
    
$sms->MsgCallback "+1 100 555 1212";
    
$sms->MsgText "Hello World From Simplewire!";

    print(
"<b>Sending message to Simplewire...</b><br>");
    
    
// Send Message
    
$sms->MsgSend();

    
// Check For Errors
    
if($sms->Success)
    {
        print(
"<b>Message was sent!</b><br>");
    }
    else
    {
        print(
"<b>Message was not sent!</b><br>");
        print(
"Error Code: $sms->ErrorCode<br>");
        print(
"Error Description: $sms->ErrorDesc<br>");
    }
?>


Usage Example


See the example


Rate This Script





Search



This Category All Categories