public function setContentType($contentType) { $this->setKey('Content-type', $contentType); }
} } } //////////////////////////////////////////////////////////////////////////////// // Code STARTS. //////////////////////////////////////////////////////////////////////////////// error_reporting(E_ALL); ini_set('display_errors', 1); try { $options = array('host' => $argv[1], 'port' => $argv[2], 'username' => $argv[3], 'secret' => $argv[4], 'connect_timeout' => 60, 'read_timeout' => 60); $a = new ClientImpl($options); $a->registerEventListener(new A()); $a->open(); // SMS $sms = new VGSMSMSTxAction(); $sms->setContentType('text/plain; charset=ASCII'); $msg = $argv[5]; $phone = $argv[6]; $sms->setContent($msg); $sms->setTo($phone); // SMS multipart MSG - This is used to send 1 big message splitted in several parts, up to 255 messages if ($argv[7] == 1) { $sms->setConcatRefId('58'); $sms->setConcatTotalMsg('2'); $sms->setConcatSeqNum('1'); $a->send($sms); $sms->setContent('---Testing Multipart message '); $sms->setTo($phone); $sms->setConcatRefId('58'); $sms->setConcatTotalMsg('2'); $sms->setConcatSeqNum('2');