how can I get image in special url [closed]

2019-09-22 12:00发布

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?

标签: php image url curl
1条回答
可以哭但决不认输i
2楼-- · 2019-09-22 12:44

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. 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

Is it what are you looking for?

查看更多
登录 后发表回答