PHPackages                             samhk222/tinyurl - 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. samhk222/tinyurl

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

samhk222/tinyurl
================

Shorten a url with tinyurl

0.0.5(2y ago)2466↓82.1%[2 PRs](https://github.com/samhk222/tinyurl/pulls)MITPHPPHP ^8.1

Since Jun 27Pushed 2y ago1 watchersCompare

[ Source](https://github.com/samhk222/tinyurl)[ Packagist](https://packagist.org/packages/samhk222/tinyurl)[ Docs](https://github.com/samhk222/tinyurl)[ GitHub Sponsors](https://github.com/samhk222)[ RSS](/packages/samhk222-tinyurl/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (5)Dependencies (6)Versions (6)Used By (0)

Package to shorten url with tinyurl (being autenticated or not)
===============================================================

[](#package-to-shorten-url-with-tinyurl-being-autenticated-or-not)

[![Latest Version on Packagist](https://camo.githubusercontent.com/6b16391a43741a6478ae6b908b660df41a9e6b0e8685b778557cbda1f44fb50b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73616d686b3232322f74696e7975726c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/samhk222/tinyurl)[![Total Downloads](https://camo.githubusercontent.com/07a119b4d28ea34145403a0d79053e6da6b52b287012b9aa707914bbd48a114f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f73616d686b3232322f74696e7975726c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/samhk222/tinyurl)

Shorten a url, beeing autenticated or not in tinyurl

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require samhk222/tinyurl
```

Usage
-----

[](#usage)

Shortening url without beeing autenticated

```
$shortened = new Samhk222\TinyUrl\TinyUrl();
echo $shortened->shorten('very long url');
```

Shortening url beeing autenticated (you can get your token [here](https://tinyurl.com/app/settings/api)). Remember, never save your token in a repo or in the code, save it to a `.env` [file](https://github.com/vlucas/phpdotenv) or something similar to that

```
$shortened = Samhk222\TinyUrl\TinyUrl::token("your token here");
echo $shortened->shorten('very long url');
```

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](https://github.com/spatie/.github/blob/main/CONTRIBUTING.md) for details.

Credits
-------

[](#credits)

- [Samuel Ferreira](https://github.com/samhk222)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

25

—

LowBetter than 35% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 66.7% 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 ~60 days

Total

3

Last Release

1028d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0f2f92b9e6c3764e3db1ca240f1b39adce81a90d8e178261a1f842c74d80daa4?d=identicon)[samhk222](/maintainers/samhk222)

---

Top Contributors

[![samhk222](https://avatars.githubusercontent.com/u/58010?v=4)](https://github.com/samhk222 "samhk222 (4 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (1 commits)")

---

Tags

tinyurlsamhk222

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/samhk222-tinyurl/health.svg)

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

###  Alternatives

[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k832.6k54](/packages/neuron-core-neuron-ai)[nfse-nacional/nfse-php

This is my package nfse

1648.4k](/packages/nfse-nacional-nfse-php)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

762297.9k53](/packages/civicrm-civicrm-core)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3661.3M49](/packages/tencentcloud-tencentcloud-sdk-php)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

353.6k](/packages/eslazarev-wildberries-sdk)[oat-sa/tao-core

TAO core extension

64147.9k151](/packages/oat-sa-tao-core)

PHPackages © 2026

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