<?php  

class cleanto_ct_nexmo{  
	var $ct_nexmo_api_key; 	 
	var $ct_nexmo_api_secret; 
	var $ct_nexmo_from; 

	public function send_nexmo_sms($phone,$ct_nexmo_text) {
		$nexmo_api_key=$this->ct_nexmo_api_key;
		$ct_nexmo_api_secret=$this->ct_nexmo_api_secret;
		$ct_nexmo_from=$this->ct_nexmo_from;
		
		$queryinfo = array('api_key' => $nexmo_api_key, 'api_secret' => $ct_nexmo_api_secret, 'to' => $phone, 'from' => $ct_nexmo_from, 'text' => $ct_nexmo_text);
		$url = 'https://rest.nexmo.com/sms/json?' . http_build_query($queryinfo);
		
		$ch = curl_init($url);
		curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
		curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
		$response = curl_exec($ch);
		return $response;
	} 
}
?>