php check if gravatar exists header error
php check if gravatar exists header error I'm trying to check if a gravatar exists. When I try the approach recommended in earlier questions, I get an error " Warning: get_headers() [function.get-headers]: This function may only be used against URLs" Anyone seen this or see the error in my code? PS I do not want to specify a default image for gravatar to serve as there could be more than one default possibilities if no gravatar exits. Also, I found a reference to error possibly being related to my ini file which I don't think my host gives me access to. If so, is there an alternative to getheaders? Many thanks. $email = $_SESSION['email']; $email= "person@gmail.com"; //for testing $gravemail = md5( strtolower( trim( $email ) ) ); $gravsrc = "http://www.gravatar.com/avatar/".$gravemail; $gravcheck = "http://www.gravatar.com/avatar/".$gravemail."?d=404"; $response = get_headers('$gravcheck'); echo $response; e...