admin-k is right. you can simply use perg_replace()..
You can also use DOMdocument() . this will find anchor tag and add nofollow
$dom = new DOMdocument();
$dom->loadHTML($part);
foreach ($dom->getElementsByTagName('a') as $node) {
if (
!$node->hasAttribute('rel')
|| !preg_match('~\bno-follow\b~', $node->getAttribute('rel'))
) {
$found = true;
break;
}
}
Get more info on stacoverflow
ckeckout my new theme which encrypts all external url like:
www.google.com
to
www.tovolt.com/redirect.php?8475684375h45488
An you can also use ADFLY in the redirect link.
here is demo tovolt, just click on the link in answers