A PHP package for working w/ the YOURLS API.
Normal composer install.
Call the desired method and submit the necessary fields as a single array:
$result = Travis\YOURLS::shorturl(array(
'endpoint' => 'http://mydomain.com/', // always required
'username' => 'foo', // always required
'password' => 'bar', // always required
'url' => 'http://www.reallylongurlthatistoolongtouseinanypracticalway.com',
));For details on what methods are avialable, check the API documentation.
When passing the API endpoint, don't include the yourls-api.php portion of the URL. Simply provide the domain where your installation of YOURLS lives, such as http://mycustomyourls.com.