src/Gravatar.php
public function exists($email)
    {
        $this->setDefaultImage('404');

        $url = $this->buildGravatarURL($email);
        $headers = get_headers($url, 1);

        return substr($headers[0], 9, 3) == '200';
    }
public function exists($email)
    {
        $this->setDefaultImage('404');

        $url = $this->buildGravatarURL($email);
        $headers = get_headers($url, 1);

        return substr($headers[0], 9, 3) == '200';
    }
public function exists ( $ email ) { $ this -> setDefaultImage ( '404' ) ; $ url = $ this -> buildGravatarURL ( $ email ) ; $ headers = get_headers ( $ url , 1 ) ; return substr ( $ headers [ 0 ] , 9 , 3 ) == '200' ; }
Check if a Gravatar image exists.

@param string $email The email address.

@return bool True if the Gravatar exists, false otherwise.
Check if a Gravatar image exists .