protected function curl($url)
    {
        // create curl resource
        if ($this->persistentConnect) {
            if (!is_resource(static::$connection)) {
                static::$connection = curl_init();
            }
            $ch = static::$connection;
        } else {
            $ch = curl_init();
        }

        // set url
        curl_setopt($ch, CURLOPT_URL, $url);
        // return the transfer as a string
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
        // disable SSL verifying
        curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
        
        if ($this->IPv6Disabled) {
            curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
        }

        // $output contains the output string
        $result = curl_exec($ch);

        if (!$result) {
            $errno = curl_errno($ch);
            $error = curl_error($ch);
        }

        if (!$this->persistentConnect) {
            // close curl resource to free up system resources
            curl_close($ch);
        }

        if (isset($errno) && isset($error)) {
            throw new \Exception($error, $errno);
        }

        return $result;
    }