code/models/PostcardMetadataField.php
/**
     * Actually makes the request to the vocabularly service.
     *
     * @param  String  $url
     * @return Array
     */
Actually makes the request to the vocabularly service.
@param  String  $url
@return Array
Actually makes the request to the vocabularly service . @param String $url @return Array
protected function makeCurlRequest($url)
    {
        $output = "";
        $statusCode = 0;
        $curlError = "";
        $ch = curl_init();
        curl_setopt($ch, CURLOPT_URL, $url);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
        $output = curl_exec($ch);
        $statusCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
        $curlError = curl_error($ch);
        curl_close($ch);
        return array($output, $statusCode, $curlError);
    }
protected function makeCurlRequest ( $ url ) { $ output = " " ; $ statusCode = 0 ; $ curlError = " " ; $ ch = curl_init ( ) ; curl_setopt ( $ ch , CURLOPT_URL , $ url ) ; curl_setopt ( $ ch , CURLOPT_RETURNTRANSFER , 1 ) ; $ output = curl_exec ( $ ch ) ; $ statusCode = curl_getinfo ( $ ch , CURLINFO_HTTP_CODE ) ; $ curlError = curl_error ( $ ch ) ; curl_close ( $ ch ) ; return array ( $ output , $ statusCode , $ curlError ) ; }
Actually makes the request to the vocabularly service.
Actually makes the request to the vocabularly service .
// create curl resource // Set url. // return the transfer as a string // Execute the curl command and get the output. // Get the status code. // Get a curl error if there is one // close curl resource to free up system resources // Return the output, statusCode, and curl error.