Only replace own website url in text with HTML links
<p>When user post a comment, i strip all the html tags in the comment before insert into my database because i do not want them to post external links(SPAM) in the comment. But i only want to strip external links, i want to display my own website URL as normal clickable links. How to detect the URL is my own website's URL and make it clickable as usual? </p>

<p>Example in the comment:
Blah... blah... blah... <a href="http://my_website_url.com" rel="nofollow">http://my_website_url.com</a> Blah... blah... blah... Blah... blah... blah... Blah... blah... blah... Blah... blah... blah... Blah... blah... blah...http://external_links.com Blah... blah... blah... Blah... blah... blah...  </p>

<p>As above example, i want ONLY <a href="http://my_website_url.com" rel="nofollow">http://my_website_url.com</a> become clickable link before insert into my database. (http://my_website_url.com to &lt; a href="http://my_website_url.com" >http://my_website_url.com&lt; /a > )</p>

<p>Also, not only detect the main URL:http://my_website_url.com, but also:</p>

<p>-http://www.my_website_url.com</p>

<p>-www.my_website_url.com</p>

<p>-my_website_url.com</p>

<p>-http://my_website_url.com/blah/blah/blah</p>

<p>-http://www.my_website_url.com/blah/blah/blah</p>

<p>-www.my_website_url.com/blah/blah/blah</p>

<p>-my_website_url.com/blah/blah/blah</p>

<p>or any URLs that from my website:http://www.my_website_url.com/xxx/xxx/xxx/xxx</p>

<p>If could, please post exactly php codes to let me copy and paste into my file because i have little knowledge with php only. Thanks guys. :) </p>
