. * * @package phpservermon * @author Perri Vardy-Mason * @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/ * @since phpservermon 2.1 **/ namespace psm\Txtmsg; class Textmarketer extends Core { // ========================================================================= // [ Fields ] // ========================================================================= public $gateway = 1; public $resultcode = null; public $resultmessage = null; public $success = false; public $successcount = 0; public function sendSMS($message) { $textmarketer_url = "https://api.textmarketer.co.uk/gateway/"; $textmarketer_data = urlencode( $message ); $textmarketer_origin = urlencode( 'SERVERALERT' ); foreach( $this->recipients as $phone ){ $URL = $textmarketer_url."?username=" . $this->username . "&password=" . $this->password . "&to=" . $phone . "&message=" . $textmarketer_data . "&orig=" . $textmarketer_origin; $result = file_get_contents( $URL ); } return $result; } } ?>