How to realize lovely random avatar in php
Today, I will talk to you about how to achieve a lovely random avatar in php. Many people may not know much about it. In order to make you understand better, the editor has summarized the following content for you. I hope you can get something according to this article.
Stumbled upon a website that can generate random avatars.
Www.atoolbox.net/Tool.php?Id=1013
So F12 opened the debugging tool and found
Then I opened this link and found that this is the website that generates random avatars.
Multiavatar.com/e27bf0174eae6bfe77...
So I changed the MD5 value behind url with curiosity, and found that the avatar had changed.
So F12 opened the debugging tool and found that
Doesn't that solve the case? You can easily write a method to generate a random avatar.
If (! function_exists ('make_avatar')) {function make_avatar ($email) {$md5_email = md5 ($email); return "https://api.multiavatar.com/{$md5_email}.png";}} after reading the above, do you have any further understanding of how to achieve cute random avatars in php? If you want to know more knowledge or related content, please follow the industry information channel, thank you for your support.