rewrite/mask external link inside article
I want to rewrite/mask all external url in my article and also add
There is a plugin for joomla which rewrite external link: rewrite plugin.
But I am not using joomla. Please have a look at above plugin, It does exactly what I am looking for.
What I want?
You can use DOMDocument to parse and traverse the document.
This approach will be much more reliable than using a regular expression based solution since it actually parses the DOM for you instead of relying on a often-fragile regex.