Answer the question
In order to leave comments, you need to log in
[[+content_image]]
How else to hide the URL in the text?
Greetings!
There are regular expressions with which the URL is cut out in the comments:
<?
$comment = eregi_replace(
'(((f|ht){1}tp://)[[email protected]:%_\+.~#?&//=]+)',
'[URL скрыт]', $comment);
$comment = eregi_replace(
'([[:space:]()[{}])(www.[[email protected]:%_\+.~#?&//=]+)',
'[URL скрыт]', $comment);
$comment = eregi_replace(
'www.[[email protected]:%_\+.~#?&//=]+',
'[URL скрыт]', $comment);
?>
Answer the question
In order to leave comments, you need to log in
eregi - deprecated
can be something like this.
$text = preg_replace('/[a-z0-9\.]+(\.(ru|net|com))+/i','[URL скрыт]',$text);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question