samhk222 / tinyurl
Shorten a url with tinyurl
Fund package maintenance!
samhk222
Requires
- php: ^8.1
- ext-curl: *
- guzzlehttp/guzzle: ^7.3
- spatie/data-transfer-object: ^3.9
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.13
- phpunit/phpunit: ^9.5
- squizlabs/php_codesniffer: ^3.7
- symfony/var-dumper: ^6.3
This package is auto-updated.
Last update: 2024-10-24 14:05:55 UTC
README
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.