This class is designed to shorten links in a minimum number of commands for YOURLS.
<?php
require_once('yourls.class.php');
$yourls = new yourls("http://YOUR_YOURLS_URI/yourls-api.php", "signature");
$yourls->link("http://www.google.com/");
echo $yourls->link;
?>
<?php
require_once('yourls.class.php');
$yourls = new yourls("http://YOUR_YOURLS_URI/yourls-api.php", "signature");
$yourls->content("Hello World! http://www.google.com/ http://www.yahoo.com/");
echo $yourls->content;
?>
YOURLS Admin Tools - API Signature - https://YOUR_DOMAIN/admin/tools.php YOURLS API Guide