Giter Club home page Giter Club logo

shorturl's Introduction

🔗PHP单文件短链接

本程序只有一个文件,极其方便部署。

体验预览

https://x007.in/

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;
}
二级目录配置

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

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

同样,这里 nginx 要做配置

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

API

生成短链接
curl -s http://127.0.0.1:12138/api/link?url=https://map.baidu.com/poi/%E4%B9%9D%E9%BE%99%E5%85%AC%E5%9B%AD/@12713897.395906774,2531599.1717763273,15.45z

Response

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

shorturl's People

Contributors

ellermister avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.