如何以 https://doesthisgifcontainananimation.com 请求的方式获得所需的响应?

How to get desired response the way https://doesthisgifcontainananimation.com requests it?

这是网站上说的,我就是不明白:

访问站点时,例如:

https://doesthisgifcontainananimation.com/[URL http://i.imgur.com/tYqyhJT.gif URL]

我得到的只是

{"error":"url_parsing_failed"}

我计划在 PHP 中将其与自定义 RSS 提要一起使用,以显示根据其内容分类的条目,在这种情况下,还要考虑图像类型(动画和非动画 GIF)。

如有任何帮助,我们将不胜感激。提前致谢。

http%3A%2F%2Fi.imgur.com%2FtYqyhJT.gif

编码意味着替换斜杠、冒号和 URL 上的每个字符,使其被视为地址,使用它们的十六进制值和百分号字符,使其仅成为一个参数。完整的 URL 则为:

https://doesthisgifcontainananimation.com/http%3A%2F%2Fi.imgur.com%2FtYqyhJT.gif

浏览器不会为您做这些……至少在这种情况下不会。

为一开始的愚蠢(呃)道歉。我现在只能说

https://doesthisgifcontainananimation.com/[URL encoded gif URL]

和我过去的问题一样不清楚。

php 我当时使用的代码是

$url="http://i.imgur.com/tYqyhJT.gif";
$encoded="https://doesthisgifcontainananimation.com/".urlencode($url);

关于编码,more information here