Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/takashiki/Ourls
url shorten service/短网址服务
https://github.com/takashiki/Ourls
composer demo php
Last synced: 2 months ago
JSON representation
url shorten service/短网址服务
- Host: GitHub
- URL: https://github.com/takashiki/Ourls
- Owner: takashiki
- License: mit
- Created: 2015-09-19T14:43:41.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2023-04-16T18:39:51.000Z (almost 2 years ago)
- Last Synced: 2024-08-02T08:07:48.791Z (6 months ago)
- Topics: composer, demo, php
- Language: PHP
- Size: 34.2 KB
- Stars: 211
- Watchers: 16
- Forks: 66
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Ourls
[![Latest Stable Version](https://poser.pugx.org/takashiki/ourls/v/stable)](https://packagist.org/packages/takashiki/ourls)
[![Total Downloads](https://poser.pugx.org/takashiki/ourls/downloads)](https://packagist.org/packages/takashiki/ourls)
[![Latest Unstable Version](https://poser.pugx.org/takashiki/ourls/v/unstable)](https://packagist.org/packages/takashiki/ourls)
[![License](https://poser.pugx.org/takashiki/ourls/license)](https://packagist.org/packages/takashiki/ourls)Ourls是一个基于发号和hashid的短网址服务,灵感来源于知乎上关于短址算法的一个讨论——
[http://www.zhihu.com/question/29270034](http://www.zhihu.com/question/29270034)。## 特征/Feature
Ourls会根据sha1值来判断原url在数据库中是否已存在,若不存在则新增记录后对记录id进行hash,产生短网址。
Ourls会对输入的url进行标准化处理,若为缺少scheme的url,会默认自动加上`http://`,
并且会对url的query参数进行排序和urlencode等。## 演示/Demo
[在线演示/Online Demo](http://skyx.in)
## 安装/Install
下载源码后运行`composer install`安装依赖包,或者运行`composer create-project takashiki/ourls`。
然后将urls.sql导入数据库中,将app目录下config.sample.php重命名为config.php并按自己实际情况修改相关配置项。
> git clone and composer install or composer create-project takashiki/ourls
> import urls.sql to your database
> rename app/config.sample.php to app/config.php
> modify the config file according to your situation
### License
Ourls is open-sourced software licensed under the
[MIT license](http://opensource.org/licenses/MIT)