php - 是否有用于 PHP 的 identicon 库

标签 php identicon

<分区>

我正在寻找可以创建 Identicon 的 PHP 库/函数/类

最佳答案

我用这个:

class Gravatar
{
    static public function GetGravatarUrl( $email, $size = 128, $type = 'identicon', $rating = 'pg' )
    {
        $gravatar = sprintf( 'http://www.gravatar.com/avatar/%s?d=%s&s=%d&r=%s',
                              md5( $email ), $type, $size, $rating );
        return $gravatar;
    }
}

这与 SO 使用的基本相同。它支持一切gravatar.com支持。

关于php - 是否有用于 PHP 的 identicon 库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/236879/

相关文章:

javascript - 使用 ng-repeat 时 Jdenticon 图标不渲染

algorithm - 在生成标识时防止生成类似万字符的图像

javascript - jQuery 在执行 Python 脚本 PHP 时加载 img

php - Magento:<?php echo $this->getChildHtml ('content' ) 的内容 ?>

identicon 的 Javascript 代码

image-processing - 如何在SO上生成用户ID图像?

从 guest 将文件添加到 VMware 主机时出现 PHP 语法错误

PHP 字符串连接 - "$a $b"与 $a 。 ""。 $b - 性能

php - 将此数组更改为一维数组的最简单方法是什么