I am looking for a simple php code to check comments submitted by end use contain any url or not. please help
You need to do a preg match to match a url into given string. Following would be of some help.. preg_match_all("#((https?://)?([-\w]+\.[-\w\.]+)+\w(:\d+)?(/([-\w/_\.]*(\?\S+)?)?)*)#", $input_text, $matches); PHP: