preg_match("/((http|https|ftp|telnet|news):\/\/)?([a-z0-9_\-\/\.]+\.[][a-z0-9:;&#@=_~%\?\/\.\,\+\-]+)/", $Msg,$arrs);
if(!empty($arrs[0])){
$http=$arrs[0];
$link=substr(md5($arrs[3]),0,5);
$linkstr='http://jj.cn/'.$link;
$Msg= preg_replace("/((http|https|ftp|telnet|news):\/\/)?([a-z0-9_\-\/\.]+\.[][a-z0-9:;&#@=_~%\?\/\.\,\+\-]+)/","<a href=\"$arrs[0]\" target=\"_blank\">$linkstr</a>",$Msg);
}
if(!empty($arrs[0])){
$http=$arrs[0];
$link=substr(md5($arrs[3]),0,5);
$linkstr='http://jj.cn/'.$link;
$Msg= preg_replace("/((http|https|ftp|telnet|news):\/\/)?([a-z0-9_\-\/\.]+\.[][a-z0-9:;&#@=_~%\?\/\.\,\+\-]+)/","<a href=\"$arrs[0]\" target=\"_blank\">$linkstr</a>",$Msg);
}