function autourl($message){
global $db_autoimg;
if($db_autoimg==1){
$message= preg_replace(array(
"/(?<=[^/]a-z0-9-=/"'///])((https?|ftp):|www/.)([a-z0-9///-_+=.~!%@?#%&;:$//│]+/.gif)/i",
"/(?<=[^/]a-z0-9-=/"'///])((https?|ftp):|www/.)([a-z0-9///-_+=.~!%@?#%&;:$//│]+/.jpg)/i"
), array(
"[img]//1//3[/img]",
"[img]//1//3[/img]"
), ' '.$message);
}
$message= preg_replace( array(
"/(?<=[^/]a-z0-9-=/"'///])((https?|ftp|gopher|news|telnet|mms|rtsp):|www/.)([a-z0-9///-_+=.~!%@?#%&;:$//│]+)/i",
"/(?<=[^/]a-z0-9///-_.~?=:.])([_a-z0-9-]+(/.[_a-z0-9-]+)*@[a-z0-9-]+(/.[a-z0-9-]+)*(/.[a-z]{2,4}))/i"
), array(
"[url]//1//3[/url]",
"[email]//0[/email]"
), ' '.$message);
return $message;
}
global $db_autoimg;
if($db_autoimg==1){
$message= preg_replace(array(
"/(?<=[^/]a-z0-9-=/"'///])((https?|ftp):|www/.)([a-z0-9///-_+=.~!%@?#%&;:$//│]+/.gif)/i",
"/(?<=[^/]a-z0-9-=/"'///])((https?|ftp):|www/.)([a-z0-9///-_+=.~!%@?#%&;:$//│]+/.jpg)/i"
), array(
"[img]//1//3[/img]",
"[img]//1//3[/img]"
), ' '.$message);
}
$message= preg_replace( array(
"/(?<=[^/]a-z0-9-=/"'///])((https?|ftp|gopher|news|telnet|mms|rtsp):|www/.)([a-z0-9///-_+=.~!%@?#%&;:$//│]+)/i",
"/(?<=[^/]a-z0-9///-_.~?=:.])([_a-z0-9-]+(/.[_a-z0-9-]+)*@[a-z0-9-]+(/.[a-z0-9-]+)*(/.[a-z]{2,4}))/i"
), array(
"[url]//1//3[/url]",
"[email]//0[/email]"
), ' '.$message);
return $message;
}