MyBB Community Forums

Full Version: use this script?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
well theres this site called coinurl.com

you shorten links and people click on them and you earn bitcoins they have an api and I want to use it on my forums

so say people post http://links.com I want it to get changed into a coinurl links

function getCoinUrl($url)
{
	$uuid = "4fe3d7fb7ccff967340165";
	$url = rawurlencode($url);

	$result = file_get_contents("https://coinurl.com/api.php?uuid={$uuid}&url={$url}");

	if($result == 'error')
		return false;
	else
		return $result;
}

thats the script they have how do I use it?
You'll need to get a plugin made for this. That function would have to be used in conjunction with the post parser.
(2012-06-23, 05:21 AM)Alex Smith Wrote: [ -> ]You'll need to get a plugin made for this. That function would have to be used in conjunction with the post parser.

do you know how to make a plugin for this?