ekkalak/rebrandly-short-url

使用 Rebrandly 的 PHP 短网址

1.0.0 2020-04-07 11:39 UTC

This package is auto-updated.

Last update: 2024-09-07 21:08:05 UTC


README

Rebrandly - 使用 PHP 短网址和分享 URL。

要求

安装

composer require ekkalak/rebrandly-short-url

使用方法

<?php 

require_once '../vendor/autoload.php';

use Ekkalak\Rebrandly\ShortURL;

$short_url = new ShortURL('YOUR-API-HERE', 'YOUR-WORKSPACE');

// Make your link shorter
// slashtag is not available
// https://developers.rebrandly.com/docs
$response = $short_url->shortUrl('https://www.your-domain.com/your-url', 'test short url', 'your-domain');

var_dump($response);