Do you know a bit.ly API Php Script example?

bit.ly, php

Solution

Going from Ceejayoz's Example, you can make it a one liner!

$short_url = json_decode(file_get_contents("http://api.bit.ly/v3/shorten?login=bitlyusername&apiKey=bitlyapikey&longUrl=".urlencode("http://example.com")."&format=json"))->data->url;

Problem

Do you have a php script that use the API from bit.ly ?

Original source