Somehow $_SERVER['REMOTE_ADDR'] is not giving me the IP address of this one user..?
<p>I've got a basic application form on my website that uses <code>$_SERVER['REMOTE_ADDR']</code> to include the IP address of the user submitting the form.</p>

<p>I'm using the following in my form processor script.</p>

<pre><code>// Create database object and connect to database.
$db = new Database($db_host, $db_username, $db_password, $db_name);
$db-&gt;connect();

// Collect POST data
$merchant_data['ip_address'] = $_SERVER['REMOTE_ADDR'];
$merchant_data['first_name'] = isset($_POST['first_name']) ? $_POST['first_name'] : '';
$merchant_data['last_name'] = isset($_POST['last_name']) ? $_POST['last_name'] : '';
$merchant_data['email_address'] = isset($_POST['email']) ? $_POST['email'] : '';
$merchant_data['phone_number'] = isset($_POST['phone']) ? $_POST['phone'] : '';
$merchant_data['customer_notes'] = isset($_POST['comments']) ? $_POST['comments'] : '';
$merchant_data['plan_name'] = isset($_POST['plan_name']) ? $_POST['plan_name'] : '';
$merchant_data['estimated_monthly_volume'] = $_SESSION['estimated_monthly_volume']; 
$merchant_data['interested_in'] = isset($_POST['interested_in']) ? $_POST['interested_in'] : '';
$merchant_data['additional_equipment_interest'] = isset($_POST['additional_equipment_interest']) ? serialize($_POST['additional_equipment_interest']) : '';
$additional_equipment_interest = isset($_POST['additional_equipment_interest']) ? $_POST['additional_equipment_interest'] : array();
$merchant_data['website_id'] = 1;

// Add new record in database.
$merchant_app_record_id = $db-&gt;query_insert('merchant_account_applications',$merchant_data);

// Close database connection
$db-&gt;close();
</code></pre>

<p>I've been getting some SPAM hits to this form lately by somebody, but somehow, this user's IP address is not getting logged in my system.</p>

<p>Every other user that goes through, though, does end up with the IP address logged.  </p>

<p>What could this person be doing to make it so my site can't grab their IP address?  I want to ban their IP but I can't get it.</p>

<p>Any information on how to get their IP or another way to ban a particular user would be greatly appreciated.</p>
