Posts

Showing posts with the label header

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...

Web page header not resizing to image

Web page header not resizing to image I have placed an image into the <header> section of my web page. The image is sized to be 100% of the width of the browser. Unfortunately the height is bigger than the <header> section. I have tried in my css to set the header height to auto, but it doesn't work, the text of my next section ends up under the <header> image. So far the only way I've found to fix it is to set the direct height of the header, but then I would have to change it for each breakpoint and that gets tedious. <header> <header> <header> Does anyone have any ideas on how I can get the header to fully contain the image without it overflowing on top of the next section? Can you post your code or add link to example? – Steve Mulvihill Jul 1 at 2:26 Works fi...