Download MMS Toolkit    |     Visit the MMS Toolkit website

Index - Log in! - Sign up! - Visit website
SEND SMS WITH PHP
 
ActiveXperts Software Forum Index -> SMS and MMS Toolkit -> General
 
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
roniwahyu



Joined: 15 Dec 2007
Posts: 2
Location: malang

PostPosted: Sun Dec 16, 2007 6:06 am    Post subject: SEND SMS WITH PHP

hi
in my project im using Siemens C55 mobile phone as modem to receive and send the message, and i using USB cable for Siemens C55.

the source code for send sms using php :


<?php
$objGsmOut = new COM ("ActiveXperts.GsmOut");
$numpesan= $objGsmOut->Send();

$objGsmOut->Device = "COM3";
// Recipient's mobile number
$objGsmOut->MessageRecipient = "+6285649555925";

//' SMS message text
$objGsmOut->MessageData = "aku sudah sukses membuat script php yang kirim sms hehehe http://roniwahyu.wordpress.com";

//with request for status report
$objGsmOut->RequestStatusReport = "true";


//' Use GSM operator's default retry time
$objGsmOut->ValidityPeriod = 0;

$objGsmOut->EnterPin ("1234");
//SIM card's PIN code

if ( $objGsmOut->LastError == 0 )
{
$objGsmOut->Send();
}

if ( $objGsmOut->LastError == 0 )
{
Echo "Sms telah terkirim, Message has been delivered";
}
else
{
$ErrorNum = $objSmpp->LastError;
$ErrorDes = $objSmpp->GetErrorDescription ( $ErrorNum );

Echo "Error sending message: #$ErrorNum ($ErrorDes).";
}

?>

okay...have a nice scripting Smile
Back to top
Display posts from previous:   
Post new topic   Reply to topic
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum