Displaying code only for certain countries
<p>So I have an affiliate program that's lately been getting a lot of bad leads from countries we don't service, which we tell affiliates will be voided. Anyways, this is going to cause our reversal rate to be through the roof. So I want to do something about it. </p>

<p>So I want to use geoip, which gets me the stuff as a 2 letter country code.</p>

<pre><code>&lt;?php
    $output = shell_exec('geoip-lookup '.$_SERVER['REMOTE_ADDR']);
?&gt;
</code></pre>

<p>So how do I put that together?</p>

<p>Would this be correct?</p>

<pre><code>&lt;?php
$output = shell_exec('geoip-lookup '.$_SERVER['REMOTE_ADDR']);
if($_SESSION['check']!=1) &amp;&amp; ($output=='US' || $output=='AU' || $output=='GB' || $output=='CA')
{
    $submission = $_POST['submission_id'];
    $_SESSION['check']=1;
    echo 'insert pixel';
}
?&gt;
</code></pre>
