Advertisement:

Author Topic: Hiding external links  (Read 230 times)

Offline mktek

  • Semi-Newbie
  • *
  • Posts: 53
Hiding external links
« on: February 27, 2018, 10:35:32 AM »
Hello,

(Sory for my bad English)

I use this code for link hidding.

Subs.php

Code: [Select]
// Registered Links
if ($user_info['is_guest'])
{
$message = preg_replace('#<a href="(.*?)</a>#i', " <i>[Hidden Link]</i> ", $message);
}
   
   
I would like to hide only external links, not my links. For example I get my site aaaaa.com. Do not hide links that have aaaaa.com inside. How can I do this with regular expression?

Thank you for your answers.