original_string: protected function call_service($serviceurl, array $params=array()) {
  
          $response = (object)array(
              'data' => null,
              'info' => null,
              'status' => null,
          );
  
          $curl = new curl();
  
          $response->data = json_decode($curl->get($serviceurl, $params, array(
              'CURLOPT_SSL_VERIFYHOST' => 2,
              'CURLOPT_SSL_VERIFYPEER' => true,
          )));
  
          $curlerrno = $curl->get_errno();
  
          if (!empty($curlerrno)) {
              debugging('cURL: Error '.$curlerrno.' when calling '.$serviceurl, DEBUG_DEVELOPER);
              return false;
          }
  
          $response->info = $curl->get_info();
  
          if (isset($response->info['ssl_verify_result']) and $response->info['ssl_verify_result'] != 0) {
              debugging('cURL/SSL: Unable to verify remote service response when calling '.$serviceurl, DEBUG_DEVELOPER);
              return false;
          }
  
          // The first response header with the HTTP status code and reason phrase.
          $response->status = array_shift($curl->response);
  
          return $response;
      }
code: protected function call_service($serviceurl, array $params=array()) {
  
          $response = (object)array(
              'data' => null,
              'info' => null,
              'status' => null,
          );
  
          $curl = new curl();
  
          $response->data = json_decode($curl->get($serviceurl, $params, array(
              'CURLOPT_SSL_VERIFYHOST' => 2,
              'CURLOPT_SSL_VERIFYPEER' => true,
          )));
  
          $curlerrno = $curl->get_errno();
  
          if (!empty($curlerrno)) {
              debugging('cURL: Error '.$curlerrno.' when calling '.$serviceurl, DEBUG_DEVELOPER);
              return false;
          }
  
          $response->info = $curl->get_info();
  
          if (isset($response->info['ssl_verify_result']) and $response->info['ssl_verify_result'] != 0) {
              debugging('cURL/SSL: Unable to verify remote service response when calling '.$serviceurl, DEBUG_DEVELOPER);
              return false;
          }
  
          // The first response header with the HTTP status code and reason phrase.
          $response->status = array_shift($curl->response);
  
          return $response;
      }
code_tokens: protected function call_service ( $ serviceurl , array $ params = array ( ) ) { $ response = ( object ) array ( 'data' => null , 'info' => null , 'status' => null , ) ; $ curl = new curl ( ) ; $ response -> data = json_decode ( $ curl -> get ( $ serviceurl , $ params , array ( 'CURLOPT_SSL_VERIFYHOST' => 2 , 'CURLOPT_SSL_VERIFYPEER' => true , ) ) ) ; $ curlerrno = $ curl -> get_errno ( ) ; if ( ! empty ( $ curlerrno ) ) { debugging ( 'cURL: Error ' . $ curlerrno . ' when calling ' . $ serviceurl , DEBUG_DEVELOPER ) ; return false ; } $ response -> info = $ curl -> get_info ( ) ; if ( isset ( $ response -> info [ 'ssl_verify_result' ] ) and $ response -> info [ 'ssl_verify_result' ] != 0 ) { debugging ( 'cURL/SSL: Unable to verify remote service response when calling ' . $ serviceurl , DEBUG_DEVELOPER ) ; return false ; } // The first response header with the HTTP status code and reason phrase. $ response -> status = array_shift ( $ curl -> response ) ; return $ response ; }
docstring: Calls the given end-point service with the given parameters.
  
  Returns false on cURL error and/or SSL verification failure. Otherwise
  an object with the response, cURL info and HTTP status message is
  returned.
  
  @param string $serviceurl
  @param array $params
  @return stdClass|bool
docstring_tokens: Calls the given end - point service with the given parameters .