Action disabled: source

TinyURL & Dokuwiki

밑의 것을 다 합치면 한줄로 됩니다.

<?php echo file_get_contents("http://tinyurl.com/api-create.php
?url=".DOKU_URL.str_ireplace(':','/',$ID))?>

도쿠위키용 입니다. 현재 보여주는 페이지의 tinyurl 결과를 출력합니다.

The popular URL shortening service TinyURL provides a quick API that creates TinyURL’s on the fly. Here’s how you can access that API.

<?php
function createTinyUrl($strURL) {
 $tinyurl = file_get_contents("http://tinyurl.com/api-create.php?url=".$strURL);
 return $tinyurl;
}
?>

Make a call to our function above, and it outputs a new tinyURL.

<?php
echo(createTinyUrl('http://vaslor.net/wiki/tinyurl'));
?>

출처: http://www.richardcastera.com/2009/05/09/creating-a-tinyurl-with-tinyurl-api