โค้ดของคุณ googlerich ใช้ได้เลยครับ ใช้กับ url ภาษาไทยได้ด้วย (เมื่อคืนแก้ได้แต่มีปัญหาเรื่อง url ภาษาไทย

ผมขออนุญาติแก้นิดหนึ่งนะครับเผื่อท่านอื่นจะนำไปใช้ กรณีที่เรารันบน localhost หรือเป็น ip เช่น http://192.168.0.1/www.thaiseoboard.com/

โค๊ด:
public function wd_makelink($thisContent)
{
$thisContent = trim($thisContent);
$thisContent = htmlspecialchars($thisContent);
$thisContent = preg_replace('#(.*)\@(.*)\.(.*)#','<a href="mailto:\\1@\\2.\\3">Send email</a>',$thisContent);
$thisContent = preg_replace('=([^\s]*)(www.)([^\s]*)=','<a href="\\1\\2\\3" target=\'_new\'>\\1\\2\\3</a>',$thisContent);
return $thisContent;
}
ตัวนี้จะใช้ได้กับ url อย่างเดียวถ้ามีรูปภาพแทรกเข้าไปในคอนเทนต์ด้วยก็จะใช้ไม่ได้เหมือนเดิมครับ เช่น
โค๊ด:
$testContent="ตามฉันมาสิ แล้วฉันจะไปหาเธอคลิกที่ลิงค์นะ http://www.seowatchtools.com/ ลองดูนะ <img src=\"http://www.xxxx.com/pic1.jpg\" />";
พอจะมีวิธีแก้มั้ยครับ