title: Combining multiple strpos() in an if () statement
body: <p>I'm trying to make added user agent stay on a page. If user agent is not detected, then redirect.</p>
  
  <p>This code works </p>
  
  <pre class="lang-php prettyprint-override"><code>$useragent = $_SERVER['HTTP_USER_AGENT'];
  
  if (strpos($useragent, "useragent") === false) {
    header("Location: http://google.com/");
  }
  </code></pre>
  
  <p>So I tried to add multiple user agent like this but didn't work.</p>
  
  <pre class="lang-php prettyprint-override"><code>$useragent = $_SERVER['HTTP_USER_AGENT'];
  
  if (
      strpos($useragent, "agent1") === false ||
      strpos($useragent, "agent2") === false ||
      strpos($useragent, "agent2") === false
  ) {
        header("Location: http://google.com/");
  }
  </code></pre>