PHPackages                             takashiki/ourls - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. takashiki/ourls

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

takashiki/ourls
===============

A url shorten service system base on hash id

v0.9.4(10y ago)21016266[1 PRs](https://github.com/takashiki/Ourls/pulls)MITPHPPHP &gt;=5.4.0

Since Sep 20Pushed 3y ago15 watchersCompare

[ Source](https://github.com/takashiki/Ourls)[ Packagist](https://packagist.org/packages/takashiki/ourls)[ Docs](https://github.com/takashiki/ourls)[ RSS](/packages/takashiki-ourls/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (5)Versions (4)Used By (0)

Ourls
=====

[](#ourls)

[![Latest Stable Version](https://camo.githubusercontent.com/2e72f6c2f8ac16c8d57b94dc3d1204394363c0d6eb6d62ede92aa94c050295d9/68747470733a2f2f706f7365722e707567782e6f72672f74616b617368696b692f6f75726c732f762f737461626c65)](https://packagist.org/packages/takashiki/ourls)[![Total Downloads](https://camo.githubusercontent.com/3901cb2ffb68af1f372035d706c21369ae35634423c16ab947a331905d16e71f/68747470733a2f2f706f7365722e707567782e6f72672f74616b617368696b692f6f75726c732f646f776e6c6f616473)](https://packagist.org/packages/takashiki/ourls)[![Latest Unstable Version](https://camo.githubusercontent.com/765306e4843a02695b38caf538f8517141514ead3bef81868ed0d426e7d9c8ff/68747470733a2f2f706f7365722e707567782e6f72672f74616b617368696b692f6f75726c732f762f756e737461626c65)](https://packagist.org/packages/takashiki/ourls)[![License](https://camo.githubusercontent.com/de906b9a743cc32dd7f7885fcf761b3615d6db02f3b7ed5ad6fb2b270e748f7b/68747470733a2f2f706f7365722e707567782e6f72672f74616b617368696b692f6f75726c732f6c6963656e7365)](https://packagist.org/packages/takashiki/ourls)

Ourls是一个基于发号和hashid的短网址服务，灵感来源于知乎上关于短址算法的一个讨论—— 。

特征/Feature
----------

[](#特征feature)

Ourls会根据sha1值来判断原url在数据库中是否已存在，若不存在则新增记录后对记录id进行hash，产生短网址。

Ourls会对输入的url进行标准化处理，若为缺少scheme的url，会默认自动加上`http://`， 并且会对url的query参数进行排序和urlencode等。

演示/Demo
-------

[](#演示demo)

[在线演示/Online Demo](http://skyx.in)

安装/Install
----------

[](#安装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

[](#license)

Ourls is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT)

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity30

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 94.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~2 days

Total

2

Last Release

3891d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/a2e0b6697b374ed2e9ff8567b7ed2ab2629fcb851b5daf891f085a47465f829e?d=identicon)[takashiki](/maintainers/takashiki)

---

Top Contributors

[![takashiki](https://avatars.githubusercontent.com/u/3853614?v=4)](https://github.com/takashiki "takashiki (33 commits)")[![xiaooloong](https://avatars.githubusercontent.com/u/3427147?v=4)](https://github.com/xiaooloong "xiaooloong (2 commits)")

---

Tags

composerdemophphashidsurl shorten

### Embed Badge

![Health badge](/badges/takashiki-ourls/health.svg)

```
[![Health](https://phpackages.com/badges/takashiki-ourls/health.svg)](https://phpackages.com/packages/takashiki-ourls)
```

###  Alternatives

[vinkla/hashids

A Hashids bridge for Laravel

2.1k13.3M73](/packages/vinkla-hashids)[elfsundae/laravel-hashid

A simple, elegant way to obfuscate your data by generating reversible, non-sequential, URL-safe identifiers.

415246.3k2](/packages/elfsundae-laravel-hashid)[deligoez/laravel-model-hashid

Generate, Save, and Route Stripe/Youtube-like Hash IDs for Laravel Eloquent Models

16498.0k](/packages/deligoez-laravel-model-hashid)[balping/laravel-hashslug

Package providing a trait to use Hashids on a model

25185.2k2](/packages/balping-laravel-hashslug)[cayetanosoriano/hashids-bundle

Bundle for integration of hashids lib to the container

22166.0k](/packages/cayetanosoriano-hashids-bundle)[light/hashids

Hashids for Yii2

1120.2k](/packages/light-hashids)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
