PHP code example of bnbwebexpertise / linkr-php-client
1. Go to this page and download the library: Download bnbwebexpertise/linkr-php-client library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
bnbwebexpertise / linkr-php-client example snippets
$client = new \Bnb\Linkr\Client('https://linkr.foo.bar', 'MyApiKey');
// Create a link - Returns a Bnb\Linkr\ShortUrl
$link = $client->shorten('https://foo.bar/with/a/very/long/url');
// Get link info - Returns a Bnb\Linkr\ShortUrl
$link = $client->info('myAlias');
// Delete a link by alias
$client->delete($link->alias);