Blacklist and preg_match
<p>I thought I had this figured out, but I'm running into an issue. I'm creating a URL blacklist in my application. I need to block all subdomains, directories, etc from an array of domains. Below is the array I have:</p>

<pre><code>$blacklist = array(
'/\.google\./',
'/\.microsoft\./',
);   
</code></pre>

<p>Here is where I'm checking:</p>

<pre><code>    $host = parse_url($url, PHP_URL_HOST);
    $blackList = $GLOBALS['blacklist'];
    foreach($blackList as $stop) {
        if (preg_match($host === $stop)) {
            die('blacklisted');
            }
        }
</code></pre>

<p>When I run this, it doesn't die as intended.</p>
