How can I just return false or true if email address is register at gravatar with php? Tnx
I think it can be useful : http://codex.wordpress.org/Using_Gravatars#Checking_for_the_Existence_of_a_Gravatar
Request the gravatar with a query parameter of d=404 (default to 404)
https://www.gravatar.com/avatar/nogravatarexistsforthisemailhash?d=404
This will return a 404 if the email does not have a registered gravatar. If one does exist, the image is returned with a 200.
So make the request, then map a 200 response to true, 404 response to false.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With