In a recent post on the 99Points.info blog Zeeshan Rasool walks you through the steps to create a share button with URL shortening using PHP, jQuery and curl.
These days every website must contain a section that is called “Share Thisâ€. After creating facebook style posting and youtube style rating system I have now come to share button. I have created youtube style share button with url shortening script. Try the demo and use this awesome tutorial on your web pages.
His tutorial includes all of the code needed - Javascript, PHP and some CSS - to create a small "share this" button that can be embedded in your site to open pages on the remote sites with the shortened URL for the current page.