Home > Article > Backend Development > Easily implement cute random avatars in php
This article will introduce you to how to easily implement cute random avatars in PHP. I hope it will be helpful to friends who need it!
Inadvertently discovered 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
https://multiavatar.com/e27bf0174eae6bfe7756
So I changed the md5 value behind the url out of curiosity and found that the avatar changed
So I opened the debugging tool with f12 and found
Isn’t this a case solved? You can just write a method to generate random avatars
if (!function_exists('make_avatar')) { function make_avatar($email) { $md5_email = md5($email); return "https://api.multiavatar.com/{$md5_email}.png"; }}
perfect! ! ! !
over! ! !
Recommended learning: "PHP Video Tutorial"
The above is the detailed content of Easily implement cute random avatars in php. For more information, please follow other related articles on the PHP Chinese website!