$services = array(
'' => 'None',
+ 'ur1.ca' => 'ur1.ca (free)',
+ '2tu.ru' => '2tu.ru (free)',
+ 'ptiturl.com' => 'ptiturl.com',
'tinyurl.com' => 'tinyurl.com',
'is.gd' => 'is.gd',
'snipr.com' => 'snipr.com',
curl_setopt($curlh, CURLOPT_RETURNTRANSFER, true);
switch($user->urlshorteningservice) {
+ case 'ur1.ca':
+ $short_url_service = new LilUrl;
+ $short_url = $short_url_service->shorten($long_url);
+ break;
+
+ case '2tu.ru':
+ $short_url_service = new TightUrl;
+ $short_url = $short_url_service->shorten($long_url);
+ break;
+
+ case 'ptiturl.com':
+ $short_url_service = new PtitUrl;
+ $short_url = $short_url_service->shorten($long_url);
+ break;
+
case 'is.gd':
curl_setopt($curlh, CURLOPT_URL, 'http://is.gd/api.php?longurl='.urlencode($long_url));
$short_url = curl_exec($curlh);