PHP: Shorten URL by cutting it from the center?
<p>i've seen in many forums that they cut the url from the center and add 3 dots if it's long in order to shorten it.</p>

<p>Example: <a href="http://stackoverflow.com/questions/1899537/ajaxify-multipart-encoded-form-upload-forms">http://stackoverflow.com/questions/1899537/ajaxify-multipart-encoded-form-upload-forms</a> ---Will be--->  <a href="http://stackoverflow.c...ed-form-upload-forms" rel="nofollow">http://stackoverflow.c...ed-form-upload-forms</a></p>

<p>How to do that using pure php?</p>

<p>Thank you</p>
