This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$link = urlencode($link); | |
//return getSmallLink($link); | |
//function getSmallLink($longurl){ | |
// Bit.ly | |
$url = "http://api.bit.ly/v3/shorten?login=YOUR_LOGIN&apiKey=YOUR_API_KEY&longUrl=$link&format=txt&history=1"; | |
$s = curl_init(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Excerpt | |
* | |
* Creates intro excerpts from long passages of text like a Ninja. | |
* | |
* @category snippet | |
* @version 1.0 | |
* @license http://www.gnu.org/copyleft/gpl.html GNU Public License (GPL) | |
* @autohor Kevin Marvin, Ryan Thrash | |
* @internal @modx_category Content |