code/pagetypes/BrowseCataloguePage.php
/**
     * Makes POST type curl request to the catalogue to get the information.
     *
     * @param  String  $data the data to send in the body of the request.
     * @return RestfulService_Response
     */
Makes POST type curl request to the catalogue to get the information.
@param  String  $data the data to send in the body of the request.
Makes POST type curl request to the catalogue to get the information . @param String $data the data to send in the body of the request .
public function curlRequest($data = null)
    {
        $ch = curl_init();
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
        curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/xml'));
        curl_setopt($ch, CURLOPT_URL, $this->CatalogueUrl);
        curl_setopt($ch, CURLOPT_POST, 1);
        curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
        curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
        $output = curl_exec($ch);
        $statusCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
        if (curl_error($ch) !== '' || $statusCode == 0) {
            $statusCode = 500;
        }
        $restfulResponse = new RestfulService_Response($output, $statusCode);
        curl_close($ch);
        return $restfulResponse;
    }
public function curlRequest ( $ data = null ) { $ ch = curl_init ( ) ; curl_setopt ( $ ch , CURLOPT_RETURNTRANSFER , true ) ; curl_setopt ( $ ch , CURLOPT_HTTPHEADER , array ( 'Content-Type: application/xml' ) ) ; curl_setopt ( $ ch , CURLOPT_URL , $ this -> CatalogueUrl ) ; curl_setopt ( $ ch , CURLOPT_POST , 1 ) ; curl_setopt ( $ ch , CURLOPT_POSTFIELDS , $ data ) ; curl_setopt ( $ ch , CURLOPT_SSL_VERIFYPEER , false ) ; $ output = curl_exec ( $ ch ) ; $ statusCode = curl_getinfo ( $ ch , CURLINFO_HTTP_CODE ) ; if ( curl_error ( $ ch ) !== '' || $ statusCode == 0 ) { $ statusCode = 500 ; } $ restfulResponse = new RestfulService_Response ( $ output , $ statusCode ) ; curl_close ( $ ch ) ; return $ restfulResponse ; }
Makes POST type curl request to the catalogue to get the information.
Makes POST type curl request to the catalogue to get the information .
// We don't care about the SSL so disable (the geocatalogue module does this). // Get the status of the response to the curn request. // Normalise the status code (0 causes the code below to error as it does not know what 0 means). // The geocatalogue module is using this for responses, has the getBody() method used in calling code. // close curl resource to free up system resources // Return the restful response.