https://github.com/owen0o0/getfavicon
获取网站的Favicon图标并显示在你的网页上.
https://github.com/owen0o0/getfavicon
favicon getfavicon ico icon
Last synced: about 1 month ago
JSON representation
获取网站的Favicon图标并显示在你的网页上.
- Host: GitHub
- URL: https://github.com/owen0o0/getfavicon
- Owner: owen0o0
- License: mit
- Created: 2019-11-26T11:09:50.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2024-12-18T08:55:30.000Z (10 months ago)
- Last Synced: 2025-05-23T22:05:05.413Z (5 months ago)
- Topics: favicon, getfavicon, ico, icon
- Language: PHP
- Size: 24.4 KB
- Stars: 227
- Watchers: 2
- Forks: 100
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# getFavicon
获取网站的Favicon图标并显示在你的网页上.### 演示
演示地址### 安装使用
+ 上传到网站根目录或者 favicon 文件夹中
+ cache 文件夹给 755 权限
+ 然后访问 http://you.url/favicon/get.php?url=https://www.iowen.cn+ 如果出现获取不了的情况建议删除缓存再试一次
+ 注:文中 faviconw 为 api 文件夹,酌情设置### 伪静态
方便cdn缓存
```
# Nginx规则
rewrite ^/favicon/(.*)\.png$ /favicon/get.php?url=$1;# Apache 规则
RewriteEngine On
RewriteRule ^favicon/(.*)\.png$ favicon/get.php?url=$1 [L]```
调用方法 http://you.url/favicon/www.iowen.cn.png
+ 注:目标网址不能有 http(s)://### 感谢
感谢 jerrybendy ,此版本只是修复一些 bug 和编写了获取方法。