【问题标题】:how can I get image in special url [closed]如何在特殊 url 中获取图像 [关闭]
【发布时间】:2013-05-17 20:17:21
【问题描述】:

我看到了一个类似http://www.example.com/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/0 的网址 访问它然后我可以获得图像 这个怎么运作? 以及如何使用 curl 和 php 获取该图像的边界?

【问题讨论】:

    标签: php image url curl


    【解决方案1】:

    通过该 URL 获取图像是什么意思?您需要使用 htaccess 重写 URL 并使用 PHP 以某种方式拦截它并从某处加载文件。

    获得图像后,您可以从中获取任何想要的信息。

    1. Rewrite URL with mod_rewrite(即:domain.com/23234234/0 到 domain.com?id=23234234&nr=0)
    2. 调用数据库以请求 id 为 23234234 的文件
    3. Show it to the user changing the content-type of the file you are showing

    你在找什么?

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-02-12
      • 1970-01-01
      • 1970-01-01
      • 2019-12-13
      • 1970-01-01
      • 2013-05-14
      • 1970-01-01
      • 2022-06-20
      相关资源
      最近更新 更多