<?php include_once("../bitly.php"); $bitly = new Bitly('<your_login>','<api_key>'); echo $bitly->expand('http://bit.ly/b6R4Uf'); // will echo the long url ?>