public function exists($email)
    {
        $path = $this->getUrl($email, null, null, '404');

        if (!$sock = @fsockopen('gravatar.com', 80, $errorNo, $error)) {
            return;
        }

        fwrite($sock, 'HEAD '.$path." HTTP/1.0\r\n\r\n");
        $header = fgets($sock, 128);
        fclose($sock);

        return strpos($header, '404') ? false : true;
    }
public function exists($email)
    {
        $path = $this->getUrl($email, null, null, '404');

        if (!$sock = @fsockopen('gravatar.com', 80, $errorNo, $error)) {
            return;
        }

        fwrite($sock, 'HEAD '.$path." HTTP/1.0\r\n\r\n");
        $header = fgets($sock, 128);
        fclose($sock);

        return strpos($header, '404') ? false : true;
    }
public function exists ( $ email ) { $ path = $ this -> getUrl ( $ email , null , null , '404' ) ; if ( ! $ sock = @ fsockopen ( 'gravatar.com' , 80 , $ errorNo , $ error ) ) { return ; } fwrite ( $ sock , 'HEAD ' . $ path . " HTTP/1.0\r\n\r\n" ) ; $ header = fgets ( $ sock , 128 ) ; fclose ( $ sock ) ; return strpos ( $ header , '404' ) ? false : true ; }
Checks if a gravatar exists for the email. It does this by checking for the presence of 404 in the header
returned. Will return null if fsockopen fails, for example when the hostname cannot be resolved.

@param string $email

@return bool|null Boolean if we could connect, null if no connection to gravatar.com
Checks if a gravatar exists for the email . It does this by checking for the presence of 404 in the header returned . Will return null if fsockopen fails for example when the hostname cannot be resolved .