Network disk straight chain related questions

Source: Internet
Author: User
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
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.