shorturl / shorturl
Free URL Shortener.
v1.2.2
2021-05-29 13:55 UTC
Requires
- php: >=5.5.9
README
Installation & loading
ShortURL is available on Packagist (using semantic versioning), and installation via Composer is the recommended way to install ShortURL. Just add this line to your composer.json
file:
⚠️ This package is not installable via Composer 1.x, please make sure you upgrade to Composer 2+. Read more about our Composer 1.x deprecation policy.
"shorturl/shorturl": "dev-master"
or run
composer require shorturl/shorturl
Quick Start
<?php use ShortURL\ShortURL\Shorten; require 'vendor/autoload.php'; $shorten = new Shorten(); echo $shorten->text('https://google.com');
Start and manage your URL
Get your API Key here
<?php use ShortURL\ShortURL\Shorten; require 'vendor/autoload.php'; $shorten = new Shorten('your_api_key'); echo $shorten->json('https://google.com');
No errors
{ "error":0, "short":"https:\/\/short-url.asia\/DkZOb" }
An error has occurred
{ "error":1, "msg":"Please enter a valid url" }