PHPackages                             zhaolm/shorturl - 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. zhaolm/shorturl

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

zhaolm/shorturl
===============

短标签 short url

v1.1(5y ago)04MITPHP

Since Nov 12Pushed 5y ago1 watchersCompare

[ Source](https://github.com/morriszhao/short_url)[ Packagist](https://packagist.org/packages/zhaolm/shorturl)[ RSS](/packages/zhaolm-shorturl/feed)WikiDiscussions main Synced today

READMEChangelog (1)DependenciesVersions (3)Used By (0)

short\_url
==========

[](#short_url)

将 长url 保存到数据库、 根据自增id 生成 短标签

table ddl

```
CREATE TABLE `short_url` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `code` char(8) NOT NULL DEFAULT '' COMMENT '实际url 8位索引 可md5(原始url) 然后取8位',
  `url` varchar(255) NOT NULL DEFAULT '',
  `create_time` int(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `idx_code` (`code`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=100009 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;

根据ddl 建表
```

\###使用

`composer require zhaolm/shorturl `

```
$url = new \ShortUrl\ShortUrl();

//生成
echo $url->shortUrlGenerate(123456789);
//解析
echo $url->shortUrlParse('8m0Kx3s');
```

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~0 days

Total

2

Last Release

2059d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/18097520?v=4)[zhaolm](/maintainers/MorrisZhao)[@morriszhao](https://github.com/morriszhao)

---

Top Contributors

[![morriszhao](https://avatars.githubusercontent.com/u/18097520?v=4)](https://github.com/morriszhao "morriszhao (6 commits)")

### Embed Badge

![Health badge](/badges/zhaolm-shorturl/health.svg)

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

###  Alternatives

[in2code/powermail

Powermail is a well-known, editor-friendly, powerful and easy to use mailform extension for TYPO3 with a lots of features

1032.6M46](/packages/in2code-powermail)[magenable/module-top-bar-notification

Magento 2 extension to display simple notice at the top of the page

107.0k](/packages/magenable-module-top-bar-notification)

PHPackages © 2026

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