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)2465↓80.8%[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 yesterday

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

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

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

983d 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

[aws/aws-sdk-php

AWS SDK for PHP - Use Amazon Web Services in your PHP project

6.3k543.5M2.6k](/packages/aws-aws-sdk-php)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k656.1k38](/packages/neuron-core-neuron-ai)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3741.3M47](/packages/tencentcloud-tencentcloud-sdk-php)[civicrm/civicrm-core

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

751291.4k43](/packages/civicrm-civicrm-core)[spatie/laravel-export

Create a static site bundle from a Laravel app

674146.0k6](/packages/spatie-laravel-export)[nfse-nacional/nfse-php

This is my package nfse

1535.3k](/packages/nfse-nacional-nfse-php)

PHPackages © 2026

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