Files
Phraseanet/lib/PHPShortener/services/tinyurl.com.php
2011-02-16 16:09:48 +01:00

27 lines
512 B
PHP

<?php
/**
* tinyurl.com adapter
*
* @author Guillermo Rauch
* @version $Id$
* @copyright Devthought, 24 April, 2009
* @package phpshortener
**/
class PHPShortenerTinyurlCom extends PHPShortenerService {
var $service = 'tinyurl.com';
/**
* Encode function
*
* @param string $url URL to encode
* @return mixed Encoded URL or false (if failed)
* @author Guillermo Rauch
*/
function encode($url){
return $this->fetch('http://tinyurl.com/api-create.php?url=' . urlencode($url));
}
}
?>