public function waha_send_seen($chatID, $session = "default"){
        $base_url = 'https://waha.citrusinno.com/api/sendSeen/';
        $ch = curl_init();
        $postFields = array(
          "chatId" => $chatID,
          "session" => $session,
        );
        curl_setopt($ch , CURLOPT_URL , $base_url);
        curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json', 'X-Api-Key: WxInANTm9KrRe685wXJFg7dw'));
        curl_setopt($ch, CURLOPT_POST, true);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
        curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($postFields));
        
        $result = curl_exec($ch);
        curl_close($ch);
    }
    
    public function waha_start_typing($chatID, $session = "default"){
        $base_url = 'https://waha.citrusinno.com/api/startTyping/';
        $ch = curl_init();
        $postFields = array(
          "chatId" => $chatID,
          "session" => $session,
        );
        curl_setopt($ch , CURLOPT_URL , $base_url);
        curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json', 'X-Api-Key: WxInANTm9KrRe685wXJFg7dw'));
        curl_setopt($ch, CURLOPT_POST, true);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
        curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($postFields));
        
        $result = curl_exec($ch);
        curl_close($ch);
    }
    
    public function waha_stop_typing($chatID, $session = "default"){
        $base_url = 'https://waha.citrusinno.com/api/stopTyping/';
        $ch = curl_init();
        $postFields = array(
          "chatId" => $chatID,
          "session" => $session,
        );
        curl_setopt($ch , CURLOPT_URL , $base_url);
        curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json', 'X-Api-Key: WxInANTm9KrRe685wXJFg7dw'));
        curl_setopt($ch, CURLOPT_POST, true);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
        curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($postFields));
        
        $result = curl_exec($ch);
        curl_close($ch);
    }

    public function waha_send_wts_message($msgLogID, $type, $user, $message, $doc = null, $link_preview = true, $session = "default1", $randMin = 3, $randMax = 6){
        
        $tel = $user->tel;
        $chatID = (strlen($tel) == 8 ? "852".$tel : $tel)."@c.us";
        //return array('status' => 'success', 'response' => '');
        $this->waha_send_seen($chatID, $session);
        
        $this->waha_start_typing($chatID, $session);
        $randWaitTime = mt_rand ($randMin*10, $randMax*10) / 10;
        sleep(ceil($randWaitTime));
        $this->waha_stop_typing($chatID, $session);
        
        $base_url = 'https://waha.citrusinno.com/api/sendText/';
        $ch = curl_init();
        $postFields = array(
          "chatId" => $chatID,
          "text" => $message,
          "linkPreview" => $link_preview,
          "session" => $session,
        );
        if($type == "IMAGE" || $type == "DOCS"){
            
            if($type == "IMAGE") $base_url = 'https://waha.citrusinno.com/api/sendImage/';
            if($type == "DOCS") $base_url = 'https://waha.citrusinno.com/api/sendFile/';
            
            //$base_url = 'https://waha.citrusinno.com/api/sendImage/';
            unset($postFields['text']);
            unset($postFields['linkPreview']);
            $postFields['caption'] = $message;
            $postFields['file'] = array(
                "mimetype" => getFileMimeType($doc['name']),
                "filename" => $doc['name'],
                "url" => $doc['url']
            );
        }
        curl_setopt($ch , CURLOPT_URL , $base_url);
        curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json', 'X-Api-Key: WxInANTm9KrRe685wXJFg7dw'));
        curl_setopt($ch, CURLOPT_POST, true);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
        curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($postFields));
        curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 30); // 連線超時秒數
        curl_setopt($ch, CURLOPT_TIMEOUT, 60);        // 整個請求最大秒數
        
        $result = curl_exec($ch);
        $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
        $errno = curl_errno($ch);
        if ($errno) {
            if ($errno == CURLE_OPERATION_TIMEOUTED) {
                // 處理 timeout 的行為，例如重試或記錄
                $error_msg = "Request timed out.";
            } else {
                $error_msg = curl_error($ch);
            }
            curl_close($ch);
            return array('status' => 'failed', 'code' => $httpCode, 'response' => $error_msg);
        }
        
        curl_close($ch);
        
        sleep(1);
        
        // $result 現在即為呼叫 API 後回應的字串，可以做 json_decode 使用：
        $response = json_decode($result, true);
        
        if($httpCode != 201){
            $response['err_code'] = $httpCode;
            return array('status' => 'failed', 'code' => $httpCode, 'response' => $result);
        } else {
            // 回傳 $response 或 $result 以供後續使用
            return array('status' => 'success', 'response' => $result);
        }
    }

以上程式碼未能在不支援curl的情況下運行，你有方法可以在不使用curl的情況下做到相同效果，在呼叫API後取回結果?