Ask for the direct chain problem of the net plate
Now a lot of network disk has a straight chain function, today saw a network of pictures of the straight-link address, copied to the browser directly downloaded, can not be used as a display
Want to ask, this kind of image straight link address in addition to download can be used to display, if only download, it is useless
Image straight-link addresses are as follows:
Http://pan.plyz.net/d.asp?u=3808477165&p=2.jpg
------to solve the idea----------------------
echo file_get_contents (' http://pan.plyz.net/d.asp?u=3808477165&p=2.jpg ');
------to solve the idea----------------------
Need to write a PHP to get the picture, and then show the place
Demo
pan.php
">
showimg.php
$url = isset ($_get[' url ')? $_get[' URL ']: ';
Header (' Content-type:image/jpeg ');
Echo file_get_contents ($url);
?>
------to solve the idea----------------------
As far as I know, it looks like the browser content-type the resources.
If it's html,css,js, the picture is directly displayed.
If this is pdf,excel, it is necessary to see whether the browser has a corresponding display plug-in, or directly download
The picture that the net disk gives, Content-type should not be image/jpg
Want to show directly, you write a small page, with the IMG tag wrapped up
But this way, may be rejected by the other side of the firewall, Referer is not in his white list