protected function sendBackgroundEncodedFormElementsByPost($urlToSendTo, $params = [])
    {
        $postingUrl = filter_var($urlToSendTo, FILTER_VALIDATE_URL);
        if ($postingUrl === false) {
            throw new \Exception('Invalid URL in ' . __FUNCTION__);
        }
        if ($params !== []) {
            $cntFailErrMsg = $this->lclMsgCmn('i18n_Error_FailedToConnect');
            $this->sendBackgroundPostData($postingUrl, $params, $cntFailErrMsg);
            return '';
        }
        throw new \Exception($this->lclMsgCmn('i18n_Error_GivenParameterIsNotAnArray'));
    }
protected function sendBackgroundEncodedFormElementsByPost($urlToSendTo, $params = [])
    {
        $postingUrl = filter_var($urlToSendTo, FILTER_VALIDATE_URL);
        if ($postingUrl === false) {
            throw new \Exception('Invalid URL in ' . __FUNCTION__);
        }
        if ($params !== []) {
            $cntFailErrMsg = $this->lclMsgCmn('i18n_Error_FailedToConnect');
            $this->sendBackgroundPostData($postingUrl, $params, $cntFailErrMsg);
            return '';
        }
        throw new \Exception($this->lclMsgCmn('i18n_Error_GivenParameterIsNotAnArray'));
    }
protected function sendBackgroundEncodedFormElementsByPost ( $ urlToSendTo , $ params = [ ] ) { $ postingUrl = filter_var ( $ urlToSendTo , FILTER_VALIDATE_URL ) ; if ( $ postingUrl === false ) { throw new \ Exception ( 'Invalid URL in ' . __FUNCTION__ ) ; } if ( $ params !== [ ] ) { $ cntFailErrMsg = $ this -> lclMsgCmn ( 'i18n_Error_FailedToConnect' ) ; $ this -> sendBackgroundPostData ( $ postingUrl , $ params , $ cntFailErrMsg ) ; return '' ; } throw new \ Exception ( $ this -> lclMsgCmn ( 'i18n_Error_GivenParameterIsNotAnArray' ) ) ; }
Send an array of parameters like a form through a POST action

@param string $urlToSendTo
@param array $params
@throws \Exception
Send an array of parameters like a form through a POST action