roniwahyu
Joined: 15 Dec 2007 Posts: 2 Location: malang
|
Posted: 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  |
|