function sendSMS($mobile,$msg) { // configuration according to SMS gateway $postData= array( 'user' => 'usrename', 'password' => 'password', 'mobiles' => $mobile, 'sender_id' => 'sender id', 'message' => $msg ); // initialization $ch = curl_init(); curl_setopt_array($ch, array( CURLOPT_URL => 'url of sms gateway', CURLOPT_RETURNTRANSFER => true, CURLOPT_POST => true, CURLOPT_POSTFIELDS => $postData )); //Ignore SSL certificate verification curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); //get response $output = curl_exec($ch); //Print the error if any if (curl_errno($ch)) { echo 'error:' . cur