Hi guys,
<?php
include('bitly.php');
$bitly = new bitly('myusername', 'myapikey');
print $bitly->shorten('http://www.google.com');
?>
WORKING!!!
$currenturl = (!empty($_SERVER['HTTPS'])) ? "https://".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'] : "http://".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];
include('bitly.php');
$bitly = new bitly('myusername', 'myapikey');
print $bitly->shorten($currenturl);
WORKING!!!
include('bitly.php');
$currenturl = (!empty($_SERVER['HTTPS'])) ? "https://".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'] : "http://".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];
$url = "somehashtag"
$shareurl = $currenturl . '#' . $url;
$bitly = new bitly('myusername', 'myapikey');
print $bitly->shorten($shareurl);
NOT WORKING!!! Any idea why? If i print out the $shareurl i can see that it's a completely normal url that i could paste onto the normal bit.ly website.
I don't get it! Any ideas? Would be great if you could help me!