codeboy89 Posted November 20, 2009 Share Posted November 20, 2009 I need a preg_match that makes sure the input begins with "http://" and contains at least one "." This is what I currently have, if (trim(strip_tags(!preg_match("#^http://www\.[a-z0-9-.]+\.[a-z]{2,4}$#i",$_POST['link'])))) Quote Link to comment Share on other sites More sharing options...
JAY6390 Posted November 20, 2009 Share Posted November 20, 2009 surely it would be better to use parse_url() Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.