check a string in the url php code example
Example: php check if string contains url
preg_match('/(http|ftp|mailto)/', $string, $matches);
var_dump($matches);
preg_match('/(http|ftp|mailto)/', $string, $matches);
var_dump($matches);