Bitly PHP Api to Create Short Link, Get Long Url and Get Stats

Use this PHP fucntion to create Bitly Short Link using PHP     In Additional to this if  you want to create Short link using php function :- <?php function createShortLink($long_url) { $bitly_login = “bitlydemo”; $bitly_api = “R_0da49e0a9118ff35f52f629d2d71bf07”; $long_url = urlencode($long_url); $bitly_response = json_decode(file_get_contents(“http://api.bit.ly/v3/shorten?login={$bitly_login}&apiKey={$bitly_api}&longUrl={$long_url}&format=json”)); $short_url = $bitly_response->data->url; return $short_url; } ?> if you want to […]

Read More