如何在网站上使用media-imdb.com图像? [英] How to use media-imdb.com images on a website?

查看:118
本文介绍了如何在网站上使用media-imdb.com图像?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在网站上工作。它基本上是一个在IMDB的帮助下工作的电影数据库。我使用从他们的服务器的图像,在localhost我能够显示它们。但是,当我把站点放在实时服务器上时,不会显示图像。

I am working on a website. It is basically a movie database working with the help of IMDB. I I use images from their server, on localhost I'm able to display them. However, when I put the site on a live server, images are not shown.

我将单个图片放在不同的文件中,以便使用此代码进行测试:

I put a single image on different file for testing with this code:

<img src="http://ia.media-imdb.com/images/M/MV5BMTM3OTUyNTI3MF5BMl5BanBnXkFtZTcwODcyMzM0Mw@@._V1_SX300.jpg" style="width:100%;height:300px">

请参阅此演示

但是,我无法查看此图片。使用firebug,它会在调试窗口显示图像。

However, I am not able to view this image. With firebug, it does display image on debug window.

我用另一个图像替换了这个图像,我可以正常看到图像。所以:为什么以前的IMDB映像不显示?

I replaced this image with another image, and I can see that image normally. So: why is the previous IMDB image not shown?

任何人都可以指出我错过了什么?

Can anyone point out what I'm missing?

推荐答案

简单答案:IMDb不允许图片热链接。

Simple answer: IMDb does not allow image hotlinking.

当您从服务器端请求文件时,会检测到该文件并阻止您的请求。

When you request the file from the server end, it detects it and blocks your request.

这篇关于如何在网站上使用media-imdb.com图像?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆