public function getProfile($email, $format = null, $secure = null)
    {
        $hash = $this->getHash($email);

        $extension = '';
        if (null !== $format) {
            $extension = strtolower($format);
        }

        if (null === $secure) {
            $secure = $this->settings['secure'];
        }

        $url = ($secure ? 'https://secure' : 'http://www').'.gravatar.com/'.$hash.'.'.$extension;

        if ($format === 'qr' || $format === 'json') {
            return $url;
        }

        $browser = new \Buzz\Browser();
        if ($format !== 'php') {
            $response = $browser->get($url, $this->headers[$format]);
        } else {
            $response = $browser->get($url);
        }

        if ($response->isOk()) {
            if ($format === 'php') {
                return unserialize($response->getContent());
            } else {
                return $response->getContent();
            }
        } elseif ($response->isNotFound()) {
            throw new GravatarException($response->getStatusCode().' Error: There is no profile associated with this email address.');
        } else {
            throw new GravatarException($response->getStatusCode().' Error: There was an error trying to fetch this profile.');
        }

        return;
    }