<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>PHPDeveloper.org</title>
    <link>http://www.phpdeveloper.org</link>
    <description>Up-to-the Minute PHP News, views and community</description>
    <language>en-us</language>
    <pubDate>Sat, 25 May 2013 01:14:51 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Lorna Mitchell's Blog: ]]></title>
      <guid>http://www.phpdeveloper.org/news/16648</guid>
      <link>http://www.phpdeveloper.org/news/16648</link>
      <description><![CDATA[<p>
<i>Lorna Mitchell</i> has a quick post to her blog today showing how you can use a simple curl call from PHP to <a href="http://www.lornajane.net/posts/2011/Shortening-URLs-from-PHP-with-Bit.ly">shorten urls with bit.ly</a> and pull back the result.
</p>
<blockquote>
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 <a href="http://bit.ly/">bit.ly</a> actually fits the bill really well. They have straightforward <a href="http://code.google.com/p/bitly-api/wiki/ApiDocumentation">api docs</a> on google code, and it's also a pretty simple function!
</blockquote>
<p>
Her code is about three lines consisting of a <a href="http://php.net/curl_init">curl_init</a> call to the bit.ly server with the URL, a <a href="http://php.net/curl_setopt">curl_setopt</a> to tell it to return the information and a <a href="http://php.net/curl_exec">curl_exec</a> 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.
</p>]]></description>
      <pubDate>Thu, 28 Jul 2011 12:03:02 -0500</pubDate>
    </item>
  </channel>
</rss>
