Short via YOURLS
This commit is contained in:
parent
e88229eb79
commit
a0ec8d2725
|
@ -141,6 +141,11 @@ class UrlShortener {
|
|||
$url = urlencode($url);
|
||||
UrlShortener::shorten_via_simple($shorturls, 'piratly', "http://pirat.ly/shortener/api/createplain/{$this->piratly_apikey}/?$url");
|
||||
}
|
||||
|
||||
function shorten_via_yourls( $url, &$shorturls ) {
|
||||
$url = urlencode($url);
|
||||
UrlShortener::shorten_via_simple($shorturls, 'yourls', "http://{$this->yourls_url}/yourls-api.php?signature={$this->yourls_apikey}&action=shorturl&format=simple&url=$url");
|
||||
}
|
||||
|
||||
// is.gd returns different short urls for same URL! How to handle this?!
|
||||
// works *sometimes*
|
||||
|
|
Loading…
Reference in a new issue