PHP图片代理缓存 永久缓存在服务器

用户访问地址,图片没有缓存的会自动缓存,缓存过的图片如果被缓存地址已经失效了,优先读取缓存。


保存为img.php文件。

如何使用:

https://域名/img.php?url=地址

案例:

https://api.photo8.site/imgdl/img.php?url=https://photo.tuchong.com/27367140/l/1142111964.webp

也可以直接插入图片。

PHP图片代理缓存 永久缓存在服务器

可以用于一些采集场景,只需要替换图片地址即可。

请使用上方代码自行搭建,本站图片代理30天自动清除缓存。

  • All rights reserved.
  • No part of this website, including text and images, may be reproduced, modified, distributed, or transmitted in any form or by any means, without the prior written permission of the author.
  • Unauthorized commercial use is strictly prohibited.
  • Unauthorized personal use is strictly prohibited.