1 Star 0 Fork 0

程江科技/php-app-shorturl

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

php-app-shorturl

🔗 PHP 轻量级短链接系统

本程序是一款简单的短链接生成系统,极其方便部署。

体验预览

php-app-shorturl.uiisc.com

preview

支持功能

  • 🌵API快速生成短链接
  • 🌱在线网页生成短链接
  • 🍄支持Redis、File缓存控制(开发中)
  • 🏄🏼‍♀️ 原始: 直接跳转到目标网站
  • 🐸无Referer: 无 Referer 参数,目标网站无法获取来源站地址
  • 🕷 加密跳转 : 加密跳转参数信息,反大部分爬虫抓取探测
  • 👺 伪装页面 : 使用随机信息、论坛、商品来骗过机器人爬虫
  • 🔥 阅后即焚: 一次性跳转(阅后即焚)
  • 🔑 密码访问: 将为你生成密码,访问时需要密码验证
  • 📝 附加图文: 附加富文本信息,您可以在此留言并分享给您的其他社交媒体用户
  • 💻 仅限PC访问
  • 📱 仅限手机访问
  • 🇨🇳 仅限中国大陆用户访问
  • 🗺️ 仅限非中国大陆用户访问

安装

下载本程序到网站根目录
php -S 127.0.0.1:12138
访问浏览

http://127.0.0.1:12138

Nginx 配置
location / {
    try_files $uri $uri/ /index.php?$query_string;
}
Apache 配置
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php/?$1 [L]
二级目录配置

比如,/shorturl// 结尾,实际访问 http://ip/shorturl/

define('SUB_PATH', '/shorturl/');

同样,这里 Nginx 要做配置

 location /shorturl {
    try_files $uri $uri/ /shorturl/index.php?$query_string;
 }

这里 Apache 要做配置

RewriteRule ^(.*)$ /shorturl/index.php/?$1 [L]

API

生成短链接
curl -s http://127.0.0.1:12138/api/link?url=https://uinote.com/article-430.html

Response

{"msg":"ok","code":200,"data":"http://127.0.0.1:12138/s/aFdlm"}

this project's initial version is forked from https://github.com/ellermister/shorturl, thanks to ellermister !

MIT License Copyright (c) 2022 Crogram Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

暂无描述 展开 收起
README
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

不能加载更多了
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
PHP
1
https://gitee.com/crogram/php-app-shorturl.git
git@gitee.com:crogram/php-app-shorturl.git
crogram
php-app-shorturl
php-app-shorturl
master

搜索帮助