仅当我使用此代码时,图片才会显示在我的网站中...
<?php
$remoteImage = "https://scontent-frt3-2.cdninstagram.com/v/t51.2885-19/s150x150/67310557_649773548849427_4130659181743046656_n.jpg?tp=1&_nc_ht=scontent-frt3-2.cdninstagram.com&_nc_ohc=M1hegfYF3_AAX9GkTGH&edm=AAuNW_gBAAAA&ccb=7-4&oh=50ba784cd64600a025031f7fc00740c1&oe=60BAEE93&_nc_sid=498da5";
$imginfo = getimagesize($remoteImage);
header("Content-type: {$imginfo['mime']}");
readfile($remoteImage);
?>
但如果使用这个:
<?php
$link = "https://scontent-frt3-2.cdninstagram.com/v/t51.2885-19/s150x150/67310557_649773548849427_4130659181743046656_n.jpg?tp=1&_nc_ht=scontent-frt3-2.cdninstagram.com&_nc_ohc=M1hegfYF3_AAX9GkTGH&edm=AAuNW_gBAAAA&ccb=7-4&oh=50ba784cd64600a025031f7fc00740c1&oe=60BAEE93&_nc_sid=498da5";
echo "<img src='$link'>";
?>
它显示损坏的图像,如下所示:https : //i.imgur.com/ufJHy1n.png 并且它只发生在 instagram 图像中,因为 url 的结尾不像 xxxx.jpg 请帮助!