#!/usr/local/bin/php getProxy(); // // Send SMS // print "Send SMS\n"; $params = array ('AccId' => $ACCID, // Account Id 'PinCode' => $PINCODE, // Pin code 'MsgTxt' => $MESSAGE, // Message text to sent 'SendFrom' => $SENDFROM, // Send from 'Destination' => $DEST_LIST, // You can send SMS to the destinations list // 'Destination' => $DESTINATION // Destination number ); // Do sending $res = $soapclient->send($params); if ($res->ErrCode) { // Fail print "Error: ".$res->ErrMsg."\n"; if ($res->ErrCode == 'INVDEST') { // Load list of invalid destinations if available if (is_array($res->InvalidDestinations)) { print "List of invalid phone numbers:\n".implode("\n", $res->InvalidDestinations)."\n"; } else if ($res->InvalidDestinations) { print "Invalid phone number: ".$res->InvalidDestinations."\n"; } } } else { // Success $SENDIGNID = $res->SendingId; print "Message Sent. Sending Id for checking status: ".$res->SendingId."\n"; } // // Check SMS sending status // print "Check SMS sending status\n"; $params = array ('AccId' => $ACCID, // Account Id 'PinCode' => $PINCODE, // Pin code 'SendingId' => $SENDIGNID); // Sending Id $res = $soapclient->status($params); if ($res->ErrCode) { // Fail print "Error: ".$res->ErrMsg."\n"; } else { // Success print "Queue: ".$res->Queue."\n". "Sent: ".$res->Sent."\n". "Delivered: ".($res->Delivered ? $res->Delivered : 'N/A')."\n". "Failed: ".$res->Failed."\n". "Cost: ".$res->Cost.' '.$res->Currency."\n"; } exit; ?>