Author Topic: Hiding external links  (Read 303 times)

Offline mktek

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

(Sory for my bad English)

I use this code for link hidding.


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 Do not hide links that have inside. How can I do this with regular expression?

Thank you for your answers.