News Feed
Jobs Feed
Sections




News Archive
feed this:

Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Lorna Mitchell's Blog:
July 28, 2011 @ 12:03:02

Lorna Mitchell has a quick post to her blog today showing how you can use a simple curl call from PHP to shorten urls with bit.ly and pull back the result.

I've been looking around for a really simple API that would be a nice place to get started using web services from PHP - and I realised that bit.ly actually fits the bill really well. They have straightforward api docs on google code, and it's also a pretty simple function!

Her code is about three lines consisting of a curl_init call to the bit.ly server with the URL, a curl_setopt to tell it to return the information and a curl_exec to execute. The result is a JSON string easily decoded with a "url" parameter containing the newly minted short URL. She also briefly mentions some of the other features of the bit.ly API including reverse translation and bundling of links.

0 comments voice your opinion now!
bitly url shortening api curl example


Community News:
The Rev=Canonical Debate
April 13, 2009 @ 09:31:58

This past weekend there was quite a bit of discussion around the "rev=canonical" proposal (see here) and how, despite the advantages (URL shortening) it seems to have there are still some downsides to be considered. Here's what some of the PHP community have been saying:

1 comment voice your opinion now!
rev canonical debate link shortening community



Community Events











Don't see your event here?
Let us know!


security hack install package composer opinion framework language symfony2 facebook application introduction overview code unittest podcast hhvm component release support

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework