I am trying to find out when a web address in submitted to my database, but this code does not seem to be working... any ideas on why it is not working?
if(!stripos($myString, ".com") || !stripos($myString, "http://"))
I am still able to submit a comment containing a web address
If you're using PHP 5.2 or later, you're better off using filter_var, like so:
if(filter_var($myString, FILTER_VALIDATE_URL))
More information on filter_var here.