samhk222/tinyurl

Shorten a url with tinyurl

Fund package maintenance!
samhk222

0.0.5 2023-10-24 12:02 UTC

README

Latest Version on Packagist Total Downloads

Shorten a url, beeing autenticated or not in tinyurl

Installation

You can install the package via composer:

composer require samhk222/tinyurl

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). Remember, never save your token in a repo or in the code, save it to a .env file or something similar to that

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

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Credits

License

The MIT License (MIT). Please see License File for more information.