Skip to content Skip to sidebar Skip to footer

Php Url Into Html Img Src

i'm using and url from Facebook to insert into HTML img src .. that url is not an image, this url (when opened on a browser) redirects to an image. );

Solution 2:

Perhaps you can get the redirected url like in this answer

$url = 'https://graph.facebook.com/274084006029120/picture?width=100';

file_get_contents($url);
preg_match('/(Location:|URI:)(.*?)\n/', implode("\n", $http_response_header), $matches);

if (isset($matches[0]))
{
    echo"<img src='".matches[0]."' />";
}

Post a Comment for "Php Url Into Html Img Src"