[Edit] Short URL Function with PHP
USAGE$longurl= "http://www.google.com/search?q=php&ie=utf-8"; $shorturl = shorturl($longurl); echo "<a href="$longurl">$shorturl</a>"; function shorturl($url){ $length = strlen($url); if($length > 45){ $length = $length - 30; $first = substr($url, 0, -$length); $last = substr($url, -15); $new = $first."[ ... ]".$last; return $new; }else{ return $url; } } |
This Page is Under Construction! - If You Want To Help Please Send your CV - Advanced Web Core (BETA)
© Advanced Web Core. All rights reserved