title: URL redirection & Un-Shorten a link via PHP
body: <p>I'm building a site which has amazon &amp; other affiliates associated with it and I'd like to use the links on twitter, however the links on twitter are shortened using bitly. Is it possible to unshorten the link using php?</p>
  
  <p>So for example, the full url may be:</p>
  
  <pre><code>http://www.mysite.com/unbit.php?url=&lt;a href="https://rads.stackoverflow.com/amzn/click/com/B0049J4O0K" rel="nofollow noreferrer" /&gt;
  </code></pre>
  
  <p>Which will automatically get shortened by twitter.</p>
  
  <p>So what I want to do then is catch the URL (url=...)on my unbit.php page, unshorten it to the full url, log the details in a table and then pass on the user from my website using the unshortened url link.</p>