. * * @package phpservermon * @author Michiel van der Wulp * @copyright Copyright (c) 2008-2017 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 FreeMobileSMS extends Core { // ========================================================================= // [ Fields ] // ========================================================================= public $gateway = 1; public $resultcode = null; public $resultmessage = null; public $success = false; public $successcount = 0; public function sendSMS($message) { $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "https://smsapi.free-mobile.fr/sendmsg?user=$this->username&pass=$this->password&msg=" . urlencode( $message ) ); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_TIMEOUT, 10); $result = curl_exec($ch); curl_close($ch); return true; } }