远程图像显示只是有时

远程图像显示只是有时

本文介绍了远程图像显示只是有时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我保持本地Intranet网站,除其他事项外,从IMDB.com显示电影海报图像。直到最近,我只是有一个Perl脚本下载我需要的图像,并将它们保存到本地服务器。但是,这成为了一个巨大的空间,猪,所以我想我可以简单地直接指向我的网站IMDB的服务器,因为我的流量是很小的。

I maintain a local intranet site that among other things, displays movie poster images from IMDB.com. Until recently, I simply had a perl script download the images I needed and save them to the local server. But that became a HUGE space-hog, so I thought I could simply point my site directly to IMDB servers, since my traffic is very minimal.

其结果是,一些图像将显示,而其他人不会。并显示的图像,有时会几个刷新后消失。 IMDB的服务器上存在的图像,它们只是不会显示我的网页上。

The result was that some images would display, while others wouldn't. And images that were displayed, would sometimes disappear after a few refreshes. The images existed on the IMDB servers, they just wouldn't display on my page.

这似乎不太可能,我认为IMDB会以某种方式阻止这种访问,但是这可能吗?有什么需要可以在我结束配置?

It seems unlikely to me that IMDB would somehow block this kind of access, but is that possible? Is there something that needs to be configured on my end?

我的想法 - 它只是没有任何意义,我

I'm out of ideas - it just doesn't make sense to me.

我服务我与的mod_perl和HTML ::梅森页面,如果这是相关的。

I'm serving my pages with mod_perl and HTML::Mason, if that's relevant.

谢谢,
瑞安

的Apache / 2.2.14(Uni​​x的)了mod_ssl / 2.2.14的OpenSSL / 0.9.8l DAV / 2的mod_perl / 2.0.4的Perl / v5.10.0

Apache/2.2.14 (Unix) mod_ssl/2.2.14 OpenSSL/0.9.8l DAV/2 mod_perl/2.0.4 Perl/v5.10.0

推荐答案

当然,他们将阻止访问类型。您使用它们的带宽,他们必须为此付出代价,为你的网站。网站会经常看,看到它不是来自他们的网站,并阻止或油门的访问。可能你看到这是一个间歇性的问题,因为IMDB是让您在使用自己的图像的一些金额。

Absolutely they would block that kind of access. You're using their bandwidth, which they have to pay for, for your web site. Sites will often look at the referrer, see that its not coming from their site, and either block or throttle access. Likely you're seeing this as an intermittent problem because IMDB is allowing you some amount of use of their images.

要了解更多信息,看看你的客户端上的HTTP日志。通过使用或通过的。看看HTTP响应codeS,你可能会看到部分4xx或5xx响应。

To find out more, look at the HTTP logs on your client. Either by using a browser plugin or by scripting it. Look at the HTTP response codes and you'll probably see some 4xx or 5xx responses.

我建议无论是在到期未使用的图像缓存缓存图像,这将平衡与空间访问,或者得到一个付费IMDB帐户。您可以得到一个API密钥用获取的图像表明你是一个付费客户。

I would suggest either caching the images in a cache that expires unused images, that will balance accesses with space, or perhaps getting a paid IMDB account. You may be able to get an API key to use to fetch images indicating you are a paying customer.

这篇关于远程图像显示只是有时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-03 01:26