Replace stropos with preg_match in if/elseif stament comparisons.