69 protected $_aOptions = array(
'CURLOPT_RETURNTRANSFER' => 1);
100 $this->_sUrl = $this->_sUrl .
"?" . $this->
getQuery();
110 $this->_sQuery = $sQuery;
120 if ( is_null( $this->_sQuery ) ) {
124 $sQuery = http_build_query( $aParams,
"",
"&" );
140 $this->_aParameters = $aParameters;
162 $this->_sHost = $sHost;
184 if ( is_null( $aHeader ) && $this->
getMethod() ==
"POST") {
188 $aHeader[] =
'POST /cgi-bin/webscr HTTP/1.1';
189 $aHeader[] =
'Content-Type: application/x-www-form-urlencoded';
190 if ( isset( $sHost ) ) {
191 $aHeader[] =
'Host: '. $sHost;
193 $aHeader[] =
'Connection: close';
195 $this->_aHeader = $aHeader;
205 if ( is_null( $this->_aHeader ) ) {
220 $this->_sMethod = strtoupper($sMethod);
245 if (strpos( $sName,
'CURLOPT_' ) !== 0 || !defined($sConstant = strtoupper($sName))) {
249 $oException =
oxNew(
'oxException' );
251 $oException->setMessage( sprintf( $oLang->translateString(
'EXCEPTION_NOT_VALID_CURL_CONSTANT', $oLang->getTplLanguage() ), $sName ) );
255 $this->_aOptions[$sName] = $sValue;
286 if ( $iCurlErrorNumber ) {
290 $oException =
oxNew(
'oxException' );
292 $oException->setMessage( sprintf( $oLang->translateString(
'EXCEPTION_CURL_ERROR', $oLang->getTplLanguage() ), $iCurlErrorNumber ) );
306 $this->_sConnectionCharset = $sCharset;
336 $this->_rCurl = $rCurl;
346 if ( is_null( $this->_rCurl ) ) {
363 $this->
_setOpt( CURLOPT_POST, 1 );
368 if ( count($aOptions) ) {
369 foreach( $aOptions as $sName => $mValue ) {
370 $this->
_setOpt( constant( $sName ), $mValue );
422 $this->_sStatusCode = curl_getinfo($this->
_getResource(), CURLINFO_HTTP_CODE);
433 $aParams = array_filter( $aParams );
434 $aParams = array_map( array( $this,
'_htmlDecode' ), $aParams );
448 if ( is_array( $mParam ) ) {
451 $mParam = html_entity_decode( stripslashes( $mParam ), ENT_QUOTES, $this->
getConnectionCharset() );