There is an issue I have with creating a filter for the correct domain and toplevel domain. For example google.com is correct and all the other not.
my code:
function my_funct($data2) { $data2 = preg_replace('#(http://www.|http:|https:|ftp://www.|https://www./|//|www.|htp:|htt:|htp:/|htt:/|)# ' , '', $data2); return $data2; }
but directories wil not be blocked
like www.google.com/directory/page/page2
is there a way to use preg_replace and put only domain and toplevel domain in it?
maybe it is possible to negate it, but he entire validation of pre_r