webdevvie/shortner-php-client

Shortner php-client PHP

dev-master 2018-03-31 13:34 UTC

This package is auto-updated.

Last update: 2024-08-29 04:48:46 UTC


README

作者: John Bakker

仍然处于开发中!请不要在生产环境中使用此工具 ;)

链接

快速开始

使用 composer 获取最新版本

composer require webdevvie/shortner-php-client

然后建立连接

<?php
//change this to the site you would like to use
$shortnerHostname = 'www.testo.local';
//your api key obtainable from the site running shortner.
$shortnerApiKey = 'testkey';

$client = new \Shortner\ApiClient($shortnerHostname,$shortnerApiKey);

$newLink = new \Shortner\API\NewLink();
$newLink->setUrl('http://www.johnbakker.name');
$shortLink = $client->createLink($newLink);
echo $shortLink->getLink()->getUrl();

当然,你可以获取许多 info 属性。

播客主持人?

联系我们,我们可以为你的节目定制一个 Shortner!只需 80 欧元/年