public function doCurl($curl_opts) {
        $retarr = array(); // Return value

        if (!$curl_opts) {
            return $retarr;
        }

        // Open curl session
        $ch = curl_init();
        if (!$ch) {
            return $retarr;
        }

        // Set curl options that were passed in
        curl_setopt_array($ch, $curl_opts);

        // Ensure that we receive full header
        curl_setopt($ch, CURLOPT_HEADER, true);

        // Send the request and get the response
        ob_start();
        $response  = curl_exec($ch);
        $curl_spew = ob_get_contents();
        ob_end_clean();

        // Check for errors
        if (curl_errno($ch)) {
            $errno  = curl_errno($ch);
            $errmsg = curl_error($ch);

            curl_close($ch);
            unset($ch);
            return $retarr;
        }
        // Get information about the transfer
        $info = curl_getinfo($ch);

        // Parse out header and body
        $header_size = curl_getinfo($ch, CURLINFO_HEADER_SIZE);
        $header      = substr($response, 0, $header_size);
        $body        = substr($response, $header_size);

        // Close curl session
        curl_close($ch);
        unset($ch);
        // Set return value
        array_push($retarr, $info, $header, $body);

        return $retarr;
    }