title: Netbilling Post Customer IP
body: <p>We have a billing script that processes credit card payments to the payment gateway at Netbilling.com.  In an effort to capture as much information as possible and reduce fraud we have written the script to post all data (name, address, etc.).  The only problem is that we cannot post the customer's IP.</p>
  
  <p>I have studied Netbilling's documentation on this issue and it seems very straight forward.  We are using their version direct3.1 and according to their recommendations we need to post the customer's IP in the format of cust_ip.</p>
  
  <p>However regardless of the different variations we try the posted IP is that of the server and not the customer.  </p>
  
  <p>Here are the various ways we have tried to implement this:</p>
  
  <pre><code>$data .= '&amp;cust_ip='.$_SERVER['REMOTE_ADDR'];
  $data .= '&amp;cust_ip='.'$ip_address=$_SERVER['REMOTE_ADDR'];
  $data .= '&amp;cust_ip='.$_SERVER['HTTP_USER_AGENT'];
  $data .= '&amp;cust_ip='.$_SERVER['ip_address'];
  </code></pre>
  
  <p>According to Netbilling we must pass this parameter as cust_ip.  Anything else will not post to their gateway.  But I cannot figure out how to post the user's remote IP.</p>