官方的文件库

从你的PHP的网站或应用程序生成安全的短链接。目前的版本是1.1.0.

PHP压缩,扩长和跟踪网址SafeMn-1-1-0.php.zip

代码

<?php
 require_once('lib/safemn.class.php');
 $safe = new Safemn();
 $url = $safe->shortenSingle('http://www.reviews-web-hosting.com/');
 $urlexpanded = $safe->expandSingle($url);
 $info = $safe->infoSingle($url);
 echo 'Short: ' . $url;
 echo "\n";
 echo 'Long: ' . $urlexpanded;
 echo "\n";
 echo "Clicks: " . $info->clicks;
 echo "\n";
?>

输出

Short: http://safe.mn/d
Long: http://www.reviews-web-hosting.com/
Clicks: 185

第三方文件库

Stanislav Shramko创建的文件库libraryLGPL (扩大/缩短)