如何获得图像在特殊的URL [英] how can I get image in special url

查看:276
本文介绍了如何获得图像在特殊的URL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我看到过一个网址,例如 http://www.example.com/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/0
访问它然后我可以得到一个图像
它是如何工作的?
,我如何得到该图像的边界使用curl与php?

I have saw a url like http://www.example.com/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/0 visit it then I can get a image how it works? and how can I get boundary of that image use curl with php?

推荐答案

图片由该URL?您需要使用htaccess重写网址,并以某种方式使用PHP进行拦截,并从某处加载该文件。

What do you mean by getting an image by that URL? You need to rewrite the URL with htaccess and intercept it somehow using PHP and loading the file from somewhere.

一旦你有了图片,你可以得到任何你想要的信息

Once you have the image you can get any info you want to from it.


  1. 使用mod_rewrite重写网址 (即:domain.com/23234234/0至domain.com?id=23234234&nr=0)

  2. 拨打要求档案ID为23234234的资料库

  3. 向更改您正在显示的文件的内容类型的用户显示

  1. Rewrite URL with mod_rewrite (i.e.: domain.com/23234234/0 to domain.com?id=23234234&nr=0)
  2. Make a call to the database requesting the file with id 23234234
  3. Show it to the user changing the content-type of the file you are showing

这是你在找什么?

这篇关于如何获得图像在特殊的URL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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