<?php require_once('../auth/auth.php');
if(strlen($PhoneNumber)>=11 || 14 <= strlen($PhoneNumber)){

    $api_query= mysqli_query($conn,"SELECT sms_api_key,sms_senderid FROM  branch WHERE brid='$brid'  AND sms_status=1  ORDER BY brid DESC
      ") or die (mysqli_error($conn));
      $row_api= mysqli_fetch_assoc($api_query);
        $sms_api_key=$row_api['sms_api_key'];
        $sms_senderid=$row_api['sms_senderid'];
    
    $url = "https://sms.welldiv.com/services/send.php?key=$sms_api_key&number=$PhoneNumber&message=$msgmsg&devices=$sms_senderid&type=sms";
    $ch = curl_init();  
      curl_setopt_array($ch, array(
    	CURLOPT_URL => $url,
    	CURLOPT_RETURNTRANSFER => true,
    	CURLOPT_POST => true,
    	CURLOPT_SSL_VERIFYHOST => false,
    	CURLOPT_SSL_VERIFYPEER => false
    ));
    /* get response */
    $data = curl_exec($ch);
    curl_close($ch);	
}
?>