diff --git a/src/psm/Txtmsg/Smsglobal.class.php b/src/psm/Txtmsg/Smsglobal.class.php deleted file mode 100755 index c5d42ad7..00000000 --- a/src/psm/Txtmsg/Smsglobal.class.php +++ /dev/null @@ -1,81 +0,0 @@ -. - * - * @package phpservermon - * @author Victor Macko - * @copyright Copyright (c) 2008-2014 Pepijn Over - * @license http://www.gnu.org/licenses/gpl.txt GNU GPL v3 - * @version Release: @package_version@ - * @link http://www.phpservermonitor.org/ - **/ - -namespace psm\Txtmsg; - -class Smsglobal extends Core { - // ========================================================================= - // [ Fields ] - // ========================================================================= - public $gateway = 1; - public $resultcode = null; - public $resultmessage = null; - public $success = false; - public $successcount = 0; - - /** - * Send the SMS message - * @param string $message - * @return boolean (true = message was sent successfully, false = there was a problem sending the message) - */ - public function sendSMS($message) { - $recipients = join(',', $this->recipients); - - if(count($recipients) == 0) { - return false; - } - - /** - * Documentation is here: http://www.smsglobal.com/http-api/ - * Recipient numbers should be in the MSIDSN format (eg. 61400111222). The '+' sign should not be included before the country code. - */ - - $from = urlencode(substr($this->originator,0 , 11)); // Max 11 Char. - - $url = 'http://www.smsglobal.com/http-api.php' . - '?action=sendsms' . - '&user=' . $this->username . - '&password=' . $this->password . - '&from=' . $from . - '&to=' . rawurlencode($recipients) . - '&clientcharset=ISO-8859-1' . - '&text=' . substr(rawurlencode($message), 0, 153); - - $returnedData = file_get_contents($url); - - $isOk = strpos($returnedData, 'OK: 0') !== false; - - $this->success = $isOk; - $this->resultmessage = $returnedData; - - if(!$isOk) { - error_log($this->resultmessage, E_USER_NOTICE); - } - - return $isOk; - } -}